|
25 | 25 | "Pragma":"no-cache",
|
26 | 26 | "Cache-Control":"no-cache"
|
27 | 27 | },
|
28 |
| - "uri":"\/test.pl?id_a= test &id_b=test2&nah=nops", |
| 28 | + "uri":"\/test.pl?id_a=test&nah=nops", |
29 | 29 | "method":"GET",
|
30 | 30 | "http_version":1.1,
|
31 | 31 | "body":""
|
|
48 | 48 | },
|
49 | 49 | "expected":{
|
50 | 50 | "audit_log":"",
|
51 |
| - "debug_log":"T \\(0\\) t:lowercase: \"test2\"", |
52 |
| - "error_log":"" |
| 51 | + "debug_log":"Saving variable: IP:nah with value: nops", |
| 52 | + "error_log":"", |
| 53 | + "http_code":200 |
53 | 54 | },
|
54 | 55 | "rules":[
|
55 | 56 | "SecRuleEngine On",
|
56 |
| - "SecRule ARGS:/^id_/ \"@contains nops\" \"id:1,t:lowercase,block,status:404\"" |
| 57 | + "SecRule ARGS:/^id_/ \"@contains test\" \"id:1,phase:2,t:lowercase,initcol:ip=%{REMOTE_ADDR}\"", |
| 58 | + "SecRule ARGS:/^id_/ \"@contains test\" \"id:2,phase:2,t:lowercase,setvar:IP.nah=nops\"", |
| 59 | + "SecRule IP:/id_a$/ \"rx .\" \"id:3,phase:2,deny,status:403\"" |
57 | 60 | ]
|
58 | 61 | },
|
59 | 62 | {
|
|
82 | 85 | "Pragma":"no-cache",
|
83 | 86 | "Cache-Control":"no-cache"
|
84 | 87 | },
|
85 |
| - "uri":"\/test.pl?id_a= test &id_b=test2&nah=nops", |
| 88 | + "uri":"\/test.pl?id_a=test&nah=nops", |
86 | 89 | "method":"GET",
|
87 | 90 | "http_version":1.1,
|
88 | 91 | "body":""
|
|
105 | 108 | },
|
106 | 109 | "expected":{
|
107 | 110 | "audit_log":"",
|
108 |
| - "debug_log":"Saving variable: IP:nah with value: nops", |
109 |
| - "error_log":"" |
| 111 | + "debug_log":"Saving variable: IP:id_a with value: nops", |
| 112 | + "http_code":403 |
110 | 113 | },
|
111 | 114 | "rules":[
|
112 | 115 | "SecRuleEngine On",
|
113 |
| - "SecRule ARGS:/^id_/ \"@contains test\" \"id:1,t:lowercase,initcol:ip=%{REMOTE_ADDR},setvar:IP.id_a=test\"", |
114 |
| - "SecRule ARGS:/^id_/ \"@contains test\" \"id:3,t:lowercase,setvar:IP.nah=nops\"", |
115 |
| - "SecRule IP:/^id_/ \"@contains test\" \"id:2,t:lowercase,initcol:ip=%{REMOTE_ADDR}\"", |
116 |
| - "SecRule IP:/^id_/ \"@contains nops\" \"id:4,t:lowercase,block,status:404\"" |
| 116 | + "SecRule ARGS:/^id_/ \"@contains test\" \"id:11,phase:2,t:lowercase,initcol:ip=%{REMOTE_ADDR}\"", |
| 117 | + "SecRule ARGS:/^id_/ \"@contains test\" \"id:12,phase:2,t:lowercase,setvar:IP.id_a=nops\"", |
| 118 | + "SecRule IP:/id_a$/ \"@contains nops\" \"id:13,phase:2,deny,status:403\"" |
117 | 119 | ]
|
118 | 120 | }
|
119 | 121 | ]
|
0 commit comments