Skip to content

Commit d302b99

Browse files
author
Felipe Zimmerle
committed
Adds test case for: #1812
1 parent 4585216 commit d302b99

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ LOG_COMPILER=test/test-suite.sh
8888
TESTS=
8989
TESTS+=test/test-cases/regression/issue-1591.json
9090
TESTS+=test/test-cases/regression/issue-1785.json
91+
TESTS+=test/test-cases/regression/issue-1812.json
9192
TESTS+=test/test-cases/regression/variable-RESPONSE_HEADERS.json
9293
TESTS+=test/test-cases/regression/config-include.json
9394
TESTS+=test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[
2+
{
3+
"enabled": 1,
4+
"version_min": 209000,
5+
"version_max": -1,
6+
"title": "Converting £ (%C2%A3) from query string",
7+
"url": "https:\/\/github.com\/SpiderLabs\/ModSecurity\/issues\/1812",
8+
"client": {
9+
"ip": "200.249.12.31",
10+
"port": 2313
11+
},
12+
"server": {
13+
"ip": "200.249.12.31",
14+
"port": 80
15+
},
16+
"request": {
17+
"headers": {
18+
"Host": "net.tutsplus.com",
19+
"User-Agent": "",
20+
"Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
21+
"Accept-Language": "en-us,en;q=0.5",
22+
"Accept-Encoding": "gzip,deflate",
23+
"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
24+
"Keep-Alive": "300",
25+
"Connection": "keep-alive",
26+
"Cookie": "PHPSESSID=r2t5uvjq435r4q7ib3vtdjq120",
27+
"Pragma": "no-cache",
28+
"Cache-Control": "no-cache"
29+
},
30+
"uri": "\/test.pl?foo=£&bar=%C2%A3",
31+
"method": "GET",
32+
"http_version": 1.1,
33+
"body": ""
34+
},
35+
"response": {
36+
"headers": {
37+
"Content-Type": "text\/xml; charset=utf-8\n\r",
38+
"Content-Length": "length\n\r"
39+
}
40+
},
41+
"expected": {
42+
"debug_log": "\/test.pl\\?foo=\\\\xc2\\\\xa3&bar=\\\\xc2\\\\xa3"
43+
},
44+
"rules": [
45+
"SecRuleEngine On",
46+
"SecRule ARGS:foo \"^$\" \"id:'900017',phase:1,t:none,deny,nolog,msg:'foo = bar'\"",
47+
"SecRule ARGS:bar \"^$\" \"id:'900018',phase:1,t:none,deny,nolog,msg:'foo = bar'\"",
48+
"SecRule REQUEST_URI \"@validatebyterange 1-255\" \"id:'900019',phase:1,t:none,deny,nolog,msg:'foo = bar'\""
49+
]
50+
}
51+
]

0 commit comments

Comments
 (0)