Skip to content

Commit 1518c43

Browse files
author
Felipe Zimmerle
committed
Adds test case for issue #1565
1 parent 1ad9525 commit 1518c43

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ TESTS+=test/test-cases/regression/variable-RESPONSE_HEADERS.json
103103
TESTS+=test/test-cases/regression/operator-rx.json
104104
TESTS+=test/test-cases/regression/variable-ARGS.json
105105
TESTS+=test/test-cases/regression/issue-394.json
106+
TESTS+=test/test-cases/regression/issue-1565.json
106107
TESTS+=test/test-cases/regression/variable-TIME_MON.json
107108
TESTS+=test/test-cases/regression/misc.json
108109
TESTS+=test/test-cases/regression/collection-regular_expression_selection.json
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
[
2+
{
3+
"enabled": 1,
4+
"version_min": 209000,
5+
"version_max": -1,
6+
"title": "Problem with OWASP CRS rule 920160 when msc_process_request_headers called (1/2)",
7+
"url": "https:\/\/github.com\/SpiderLabs\/ModSecurity\/issues\/1565",
8+
"gihub_issue": 394,
9+
"client": {
10+
"ip": "200.249.12.31",
11+
"port": 2313
12+
},
13+
"server": {
14+
"ip": "200.249.12.31",
15+
"port": 80
16+
},
17+
"request": {
18+
"headers":{
19+
"Host":"localhost",
20+
"User-Agent":"curl/7.38.0",
21+
"Accept":"*/*",
22+
"Content-Length": "1539"
23+
},
24+
"body": "",
25+
"method": "GET",
26+
"http_version": 1.1
27+
},
28+
"response": {
29+
"headers": "",
30+
"body": ""
31+
},
32+
"expected": {
33+
"debug_log": "Rule returned 0."
34+
},
35+
"rules": [
36+
"SecRuleEngine On",
37+
"SecRule REQUEST_HEADERS:Content-Length \"!^\\d+$\" \"id:1,log\""
38+
]
39+
},
40+
{
41+
"enabled": 1,
42+
"version_min": 209000,
43+
"version_max": -1,
44+
"title": "Problem with OWASP CRS rule 920160 when msc_process_request_headers called (2/2)",
45+
"url": "https:\/\/github.com\/SpiderLabs\/ModSecurity\/issues\/1565",
46+
"gihub_issue": 394,
47+
"client": {
48+
"ip": "200.249.12.31",
49+
"port": 2313
50+
},
51+
"server": {
52+
"ip": "200.249.12.31",
53+
"port": 80
54+
},
55+
"request": {
56+
"headers":{
57+
"Host":"localhost",
58+
"User-Agent":"curl/7.38.0",
59+
"Accept":"*/*",
60+
"Content-Length": "1539"
61+
},
62+
"body": "",
63+
"method": "GET",
64+
"http_version": 1.1
65+
},
66+
"response": {
67+
"headers": "",
68+
"body": ""
69+
},
70+
"expected": {
71+
"debug_log": "Rule returned 1"
72+
},
73+
"rules": [
74+
"SecRuleEngine On",
75+
"SecRule REQUEST_HEADERS:Content-Length \"^\\d+$\" \"id:1,log\""
76+
]
77+
}
78+
79+
]

0 commit comments

Comments
 (0)