The rule:
SecRule ARGS:var "!@streq hello" "id:100,phase:1,deny,log"
Example of denied request:
curl http://localhost:8080/?var=hi
Log message:
Access denied with code 403 (phase 1). Matched "Operator `StrEq' with parameter `hello' against variable `ARGS:var' (Value: `hi' )
Reading the log message alone is confusing, why does @StrEq hello have a match for hi?
Also, I think the use of backticks (`) and single quotes (') in the log message should be fixed.
The rule:
Example of denied request:
Log message:
Reading the log message alone is confusing, why does
@StrEq hellohave a match forhi?Also, I think the use of backticks (`) and single quotes (') in the log message should be fixed.