nbs-system / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
GNU General Public License v3.0
4.8k stars 606 forks source link

Checking the coincidence of several "checkrule". #373

Closed vel21ripn closed 2 years ago

vel21ripn commented 7 years ago

Syntax:

   CheckRule "condition" AND;

Example:

   CheckRule "$VAR1 > 0" AND;
   CheckRule "$VAR2 > 0" AND;
   CheckRule "$VAR3 > 0" BLOCK;

The request will be blocked only if all three conditions are met at the same time.

The debug output is slightly changed.

buixor commented 7 years ago

Looks like a great feature, can you provide some unit tests so I can review and play around ?

Thanks :+1:

vel21ripn commented 7 years ago

Checking several conditions does not give you any new features, but allows you to write more readable rules.