Changes MATCHED_VAR behaviour

Only cleanup the variable if there wasn't a match within the rule
This commit is contained in:
Felipe Zimmerle
2016-07-29 10:40:45 -07:00
parent 665df04516
commit 0e5f72977e
3 changed files with 8 additions and 6 deletions

View File

@@ -38,7 +38,7 @@
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS:key \"@contains other_value\" \"id:1,phase:request,chain\"",
"SecRule MATCHED_VAR \"@eq asdf\" \"phase:request,pass\""
"SecRule MATCHED_VAR \"@contains asdf\" \"phase:request,pass\""
]
},
{
@@ -80,7 +80,7 @@
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS:key \"@contains other_value\" \"chain,phase:response,id:28\"",
"SecRule MATCHED_VAR \"@eq Aasdf\" \"pass\"",
"SecRule MATCHED_VAR \"@contains Aasdf\" \"pass\"",
"SecRule MATCHED_VAR \"@contains other_value\" \"id:29,phase:response,pass\"",
"SecRule MATCHED_VAR \"@contains other_value\" \"id:30,phase:response,pass\""
]