|
2 | 2 | {
|
3 | 3 | "enabled":1,
|
4 | 4 | "version_min":300000,
|
5 |
| - "title":"Testing Variables :: MATCHED_VAR (1/2)", |
| 5 | + "title":"Testing Variables :: MATCHED_VAR (1/5)", |
6 | 6 | "client":{
|
7 | 7 | "ip":"200.249.12.31",
|
8 | 8 | "port":123
|
|
42 | 42 | {
|
43 | 43 | "enabled":1,
|
44 | 44 | "version_min":300000,
|
45 |
| - "title":"Testing Variables :: MATCHED_VAR (2/2)", |
| 45 | + "title":"Testing Variables :: MATCHED_VAR (2/5)", |
46 | 46 | "client":{
|
47 | 47 | "ip":"200.249.12.31",
|
48 | 48 | "port":123
|
|
81 | 81 | "SecRule MATCHED_VAR \"@contains other_value\" \"id:29,pass\"",
|
82 | 82 | "SecRule MATCHED_VAR \"@contains other_value\" \"id:30,pass\""
|
83 | 83 | ]
|
| 84 | + }, |
| 85 | + { |
| 86 | + "enabled":1, |
| 87 | + "version_min":300000, |
| 88 | + "title":"Testing Variables :: MATCHED_VAR (3/5)", |
| 89 | + "client":{ |
| 90 | + "ip":"200.249.12.31", |
| 91 | + "port":123 |
| 92 | + }, |
| 93 | + "server":{ |
| 94 | + "ip":"200.249.12.31", |
| 95 | + "port":80 |
| 96 | + }, |
| 97 | + "request":{ |
| 98 | + "headers":{ |
| 99 | + "Host":"localhost", |
| 100 | + "User-Agent":"curl/7.38.0", |
| 101 | + "Accept":"*/*" |
| 102 | + }, |
| 103 | + "uri":"/?foo=1&bar=2&baz=2", |
| 104 | + "method":"GET" |
| 105 | + }, |
| 106 | + "response":{ |
| 107 | + "headers":{ |
| 108 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 109 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 110 | + "Content-Type":"text/html" |
| 111 | + }, |
| 112 | + "body":[ |
| 113 | + "no need." |
| 114 | + ] |
| 115 | + }, |
| 116 | + "expected":{ |
| 117 | + "http_code": 200 |
| 118 | + }, |
| 119 | + "rules":[ |
| 120 | + "SecRuleEngine On", |
| 121 | + "SecRule ARGS \"@rx 1\" \"id:1,phase:1,pass\"", |
| 122 | + "SecRule ARGS \"@rx 2\" \"id:2,phase:1,pass\"", |
| 123 | + "SecRule MATCHED_VAR \"@eq 1\" \"id:3,phase:1,deny,status:403\"" |
| 124 | + ] |
| 125 | + }, |
| 126 | + { |
| 127 | + "enabled":1, |
| 128 | + "version_min":300000, |
| 129 | + "title":"Testing Variables :: MATCHED_VAR (4/5)", |
| 130 | + "client":{ |
| 131 | + "ip":"200.249.12.31", |
| 132 | + "port":123 |
| 133 | + }, |
| 134 | + "server":{ |
| 135 | + "ip":"200.249.12.31", |
| 136 | + "port":80 |
| 137 | + }, |
| 138 | + "request":{ |
| 139 | + "headers":{ |
| 140 | + "Host":"localhost", |
| 141 | + "User-Agent":"curl/7.38.0", |
| 142 | + "Accept":"*/*" |
| 143 | + }, |
| 144 | + "uri":"/?foo=1&bar=2&baz=2", |
| 145 | + "method":"GET" |
| 146 | + }, |
| 147 | + "response":{ |
| 148 | + "headers":{ |
| 149 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 150 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 151 | + "Content-Type":"text/html" |
| 152 | + }, |
| 153 | + "body":[ |
| 154 | + "no need." |
| 155 | + ] |
| 156 | + }, |
| 157 | + "expected":{ |
| 158 | + "http_code": 200 |
| 159 | + }, |
| 160 | + "rules":[ |
| 161 | + "SecRuleEngine On", |
| 162 | + "SecRule ARGS \"@rx 1\" \"id:1,phase:1,pass\"", |
| 163 | + "SecRule ARGS \"@rx 2\" \"id:2,phase:1,pass\"", |
| 164 | + "SecRule MATCHED_VAR \"@eq 2\" \"id:3,phase:1,deny,status:403\"" |
| 165 | + ] |
| 166 | + }, |
| 167 | + { |
| 168 | + "enabled":1, |
| 169 | + "version_min":300000, |
| 170 | + "title":"Testing Variables :: MATCHED_VAR (5/5)", |
| 171 | + "client":{ |
| 172 | + "ip":"200.249.12.31", |
| 173 | + "port":123 |
| 174 | + }, |
| 175 | + "server":{ |
| 176 | + "ip":"200.249.12.31", |
| 177 | + "port":80 |
| 178 | + }, |
| 179 | + "request":{ |
| 180 | + "headers":{ |
| 181 | + "Host":"localhost", |
| 182 | + "User-Agent":"curl/7.38.0", |
| 183 | + "Accept":"*/*" |
| 184 | + }, |
| 185 | + "uri":"/?foo=1&bar=2&baz=2", |
| 186 | + "method":"GET" |
| 187 | + }, |
| 188 | + "response":{ |
| 189 | + "headers":{ |
| 190 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 191 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 192 | + "Content-Type":"text/html" |
| 193 | + }, |
| 194 | + "body":[ |
| 195 | + "no need." |
| 196 | + ] |
| 197 | + }, |
| 198 | + "expected":{ |
| 199 | + "http_code": 403 |
| 200 | + }, |
| 201 | + "rules":[ |
| 202 | + "SecRuleEngine On", |
| 203 | + "SecRule ARGS \"@rx 1\" \"id:1,phase:1,pass\"", |
| 204 | + "SecRule ARGS \"@rx 2\" \"id:2,phase:1,deny,status:403,chain\"", |
| 205 | + "SecRule MATCHED_VAR \"@eq 2\"" |
| 206 | + ] |
84 | 207 | }
|
85 | 208 | ]
|
86 |
| - |
|
0 commit comments