Parser: Pipes are no longer welcomed inside regex dict element selection.

Issue #1591
This commit is contained in:
Felipe Zimmerle
2017-10-17 11:46:14 -03:00
parent 1518c43d61
commit 30797a458b
5 changed files with 2371 additions and 2279 deletions

View File

@@ -0,0 +1,81 @@
[
{
"enabled": 1,
"version_min": 209000,
"version_max": -1,
"title": "Regular expressions in rule targets not respected (1/2)",
"url": "https:\/\/github.com\/SpiderLabs\/ModSecurity\/issues\/1591",
"gihub_issue": 394,
"client": {
"ip": "200.249.12.31",
"port": 2313
},
"server": {
"ip": "200.249.12.31",
"port": 80
},
"request": {
"headers":{
"Host":"localhost",
"User-Agent":"curl/7.38.0",
"Accept":"*/*",
"Content-Length": "1539",
"Cookie": "__utma=1.32168570.12572608.1259628772.2&__utmb=1.4.10.1259628772&"
},
"body": "",
"method": "GET",
"http_version": 1.1
},
"response": {
"headers": "",
"body": ""
},
"expected": {
"debug_log": "Rule returned 0."
},
"rules": [
"SecRuleEngine On",
"SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|!REQUEST_COOKIES:/_pk_ref/|!REQUEST_COOKIES:/__utm/|!REQUEST_COOKIES:/_pk_ref/ \"321\" \"id:1,log\""
]
},
{
"enabled": 1,
"version_min": 209000,
"version_max": -1,
"title": "Regular expressions in rule targets not respected (2/2)",
"url": "https:\/\/github.com\/SpiderLabs\/ModSecurity\/issues\/1591",
"gihub_issue": 394,
"client": {
"ip": "200.249.12.31",
"port": 2313
},
"server": {
"ip": "200.249.12.31",
"port": 80
},
"request": {
"headers":{
"Host":"localhost",
"User-Agent":"curl/7.38.0",
"Accept":"*/*",
"Content-Length": "1539",
"Cookie": "__utma=1.32168570.12572608.1259628772.2&__utmb=1.4.10.1259628772&"
},
"body": "",
"method": "GET",
"http_version": 1.1
},
"response": {
"headers": "",
"body": ""
},
"expected": {
"debug_log": "Rule returned 1."
},
"rules": [
"SecRuleEngine On",
"SecRule REQUEST_COOKIES \"321\" \"id:1,log\""
]
}
]