mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Refactoring on the Rule class
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"version_min":300000,
|
||||
"title":"Testing CtlRuleRemoveTargetById (1)",
|
||||
"expected":{
|
||||
"debug_log": "Variable: ARGS:pwd was excluded by ruleRemoveTargetById..."
|
||||
"http_code": 200
|
||||
},
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
@@ -27,8 +27,9 @@
|
||||
"port":80
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
"SecRule REQUEST_FILENAME \"@endsWith /wp-login.php\" \"id:9002100,phase:2,t:none,nolog,pass,ctl:ruleRemoveTargetById=1;ARGS:pwd\"",
|
||||
"SecRule ARGS \"@contais whe\" \"id:1,phase:3,t:none,nolog,pass,tag:'CRS'\""
|
||||
"SecRule ARGS \"@contains lhebs\" \"id:1,phase:3,t:none,status:202,block,deny,tag:'CRS'\""
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -68,7 +69,7 @@
|
||||
"version_min":300000,
|
||||
"title":"Testing CtlRuleRemoveTargetById (3)",
|
||||
"expected":{
|
||||
"debug_log": "Variable: ARGS was excluded by ruleRemoveTargetById..."
|
||||
"http_code": 200
|
||||
},
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
@@ -92,7 +93,7 @@
|
||||
},
|
||||
"rules":[
|
||||
"SecRule REQUEST_FILENAME \"@endsWith /wp-login.php\" \"id:9002100,phase:2,t:none,nolog,pass,ctl:ruleRemoveTargetById=1;ARGS\"",
|
||||
"SecRule ARGS \"@contais whe\" \"id:1,phase:3,t:none,nolog,pass,tag:'CRS'\""
|
||||
"SecRule ARGS \"@contains lhebs\" \"id:1,phase:3,t:none,status:202,block,deny,tag:'CRS'\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"version_min":300000,
|
||||
"title":"Testing CtlRuleRemoteTargetByTag (1)",
|
||||
"expected":{
|
||||
"debug_log": "Variable: ARGS:pwd was excluded by ruleRemoteTargetByTag..."
|
||||
"http_code": 200
|
||||
},
|
||||
"client":{
|
||||
"ip":"200.249.12.31",
|
||||
@@ -27,8 +27,9 @@
|
||||
"port":80
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
"SecRule REQUEST_FILENAME \"@endsWith /wp-login.php\" \"id:9002100,phase:2,t:none,nolog,pass,ctl:ruleRemoveTargetByTag=CRS;ARGS:pwd\"",
|
||||
"SecRule ARGS \"@contais whe\" \"id:1,phase:3,t:none,nolog,pass,tag:'CRS'\""
|
||||
"SecRule ARGS \"@contains lhebs\" \"id:1,phase:3,t:none,nolog,pass,tag:'CRS',deny\""
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@@ -31,11 +31,11 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"ARGS:key is part of the exclusion list \\(from update by ID\\), skipping"
|
||||
"http_code": 200
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleUpdateTargetById 1 !ARGS",
|
||||
"SecRule ARGS \"@contains test\" \"id:1,pass,t:trim,tag:'test'\""
|
||||
"SecRule ARGS \"@contains value\" \"id:1,pass,t:trim,tag:'test',deny\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -31,11 +31,12 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"ARGS:key is part of the exclusion list \\(from update by msg\\), skipping"
|
||||
"http_code": 200
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
"SecRuleUpdateTargetByMsg test !ARGS",
|
||||
"SecRule ARGS \"@contains test\" \"id:1,pass,t:trim,msg:'test'\""
|
||||
"SecRule ARGS \"@contains value\" \"id:1,pass,t:trim,msg:'test',deny\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -31,11 +31,12 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"ARGS:key is part of the exclusion list \\(from update by tag\\), skipping"
|
||||
"http_code": 200
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
"SecRuleUpdateTargetByTag test !ARGS",
|
||||
"SecRule ARGS \"@contains test\" \"id:1,pass,t:trim,tag:'test'\""
|
||||
"SecRule ARGS \"@contains value\" \"id:1,pass,t:trim,tag:'test',deny\""
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user