Forces disruptive to be first-rule-only

ModSecurity version 3 is capable to handle disruptive actions in different
rules from the chain. However, lets get it working in the same fashion that
we have in version 2.
This commit is contained in:
Felipe Zimmerle
2017-04-24 21:02:50 -03:00
parent 7e59250068
commit 6421ff087a
9 changed files with 71 additions and 37 deletions

View File

@@ -2,7 +2,7 @@
{
"enabled":1,
"version_min":300000,
"title":"Testing Variables :: MATCHED_VAR (1/2)",
"title":"Testing Config :: Phases by name (1/2)",
"client":{
"ip":"200.249.12.31",
"port":123
@@ -35,14 +35,14 @@
},
"rules":[
"SecRuleEngine On",
"SecRule ARGS:key \"@contains other_value\" \"id:1,phase:request,chain\"",
"SecRule MATCHED_VAR \"@contains asdf\" \"phase:request,pass\""
"SecRule ARGS:key \"@contains other_value\" \"id:1,phase:request,pass,chain\"",
"SecRule MATCHED_VAR \"@contains asdf\" \"\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Testing Variables :: MATCHED_VAR (2/2)",
"title":"Testing Config :: Phases by name (2/2)",
"client":{
"ip":"200.249.12.31",
"port":123
@@ -75,8 +75,8 @@
},
"rules":[
"SecRuleEngine On",
"SecRule ARGS:key \"@contains other_value\" \"chain,phase:response,id:28\"",
"SecRule MATCHED_VAR \"@contains Aasdf\" \"pass\"",
"SecRule ARGS:key \"@contains other_value\" \"chain,pass,phase:response,id:28\"",
"SecRule MATCHED_VAR \"@contains Aasdf\" \"\"",
"SecRule MATCHED_VAR \"@contains other_value\" \"id:29,phase:response,pass\"",
"SecRule MATCHED_VAR \"@contains other_value\" \"id:30,phase:response,pass\""
]