|
2 | 2 | { |
3 | 3 | "enabled":1, |
4 | 4 | "version_min":300000, |
5 | | - "title":"SecRuleUpdateTargetByTag (1/4)", |
| 5 | + "title":"SecRuleUpdateTargetByTag (1/6)", |
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":"SecRuleUpdateTargetByTag (2/4)", |
| 45 | + "title":"SecRuleUpdateTargetByTag (2/6)", |
46 | 46 | "client":{ |
47 | 47 | "ip":"200.249.12.31", |
48 | 48 | "port":123 |
|
82 | 82 | { |
83 | 83 | "enabled":1, |
84 | 84 | "version_min":300000, |
85 | | - "title":"SecRuleUpdateTargetByTag (3/4)", |
| 85 | + "title":"SecRuleUpdateTargetByTag (3/6)", |
86 | 86 | "client":{ |
87 | 87 | "ip":"200.249.12.31", |
88 | 88 | "port":123 |
|
122 | 122 | { |
123 | 123 | "enabled":1, |
124 | 124 | "version_min":300000, |
125 | | - "title":"SecRuleUpdateTargetByTag (4/4)", |
| 125 | + "title":"SecRuleUpdateTargetByTag (4/6)", |
126 | 126 | "client":{ |
127 | 127 | "ip":"200.249.12.31", |
128 | 128 | "port":123 |
|
158 | 158 | "SecRuleUpdateTargetByTag test !ARGS:/ke/", |
159 | 159 | "SecRule ARGS \"@contains value\" \"id:1,pass,t:trim,tag:'test',deny\"" |
160 | 160 | ] |
| 161 | + }, |
| 162 | + { |
| 163 | + "enabled":1, |
| 164 | + "version_min":300000, |
| 165 | + "title":"SecRuleUpdateTargetByTag Test (5/6) Regex with match anchored at beginning of Subject", |
| 166 | + "client":{ |
| 167 | + "ip":"200.249.12.31", |
| 168 | + "port":123 |
| 169 | + }, |
| 170 | + "server":{ |
| 171 | + "ip":"200.249.12.31", |
| 172 | + "port":80 |
| 173 | + }, |
| 174 | + "request":{ |
| 175 | + "headers":{ |
| 176 | + "Host":"localhost", |
| 177 | + "User-Agent":"curl/7.38.0", |
| 178 | + "Accept":"*/*" |
| 179 | + }, |
| 180 | + "uri":"/?key=value&ref=something", |
| 181 | + "method":"GET" |
| 182 | + }, |
| 183 | + "response":{ |
| 184 | + "headers":{ |
| 185 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 186 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 187 | + "Content-Type":"text/html" |
| 188 | + }, |
| 189 | + "body":[ |
| 190 | + "no need." |
| 191 | + ] |
| 192 | + }, |
| 193 | + "expected":{ |
| 194 | + "http_code": 200 |
| 195 | + }, |
| 196 | + "rules":[ |
| 197 | + "SecRuleEngine On", |
| 198 | + "SecRuleUpdateTargetByTag test !ARGS:'/(?!ref)/'", |
| 199 | + "SecRule ARGS \"@contains value\" \"id:1,pass,t:trim,tag:'test',deny\"" |
| 200 | + ] |
| 201 | + }, |
| 202 | + { |
| 203 | + "enabled":1, |
| 204 | + "version_min":300000, |
| 205 | + "title":"SecRuleUpdateTargetByTag Test (6/6) Regex with match anchored at beginning of Subject", |
| 206 | + "client":{ |
| 207 | + "ip":"200.249.12.31", |
| 208 | + "port":123 |
| 209 | + }, |
| 210 | + "server":{ |
| 211 | + "ip":"200.249.12.31", |
| 212 | + "port":80 |
| 213 | + }, |
| 214 | + "request":{ |
| 215 | + "headers":{ |
| 216 | + "Host":"localhost", |
| 217 | + "User-Agent":"curl/7.38.0", |
| 218 | + "Accept":"*/*" |
| 219 | + }, |
| 220 | + "uri":"/?key=value&ref=something", |
| 221 | + "method":"GET" |
| 222 | + }, |
| 223 | + "response":{ |
| 224 | + "headers":{ |
| 225 | + "Date":"Mon, 13 Jul 2015 20:02:41 GMT", |
| 226 | + "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", |
| 227 | + "Content-Type":"text/html" |
| 228 | + }, |
| 229 | + "body":[ |
| 230 | + "no need." |
| 231 | + ] |
| 232 | + }, |
| 233 | + "expected":{ |
| 234 | + "http_code": 200 |
| 235 | + }, |
| 236 | + "rules":[ |
| 237 | + "SecRuleEngine On", |
| 238 | + "SecRuleUpdateTargetByTag test !ARGS:'/^ref/'", |
| 239 | + "SecRule ARGS \"@contains something\" \"id:1,pass,t:trim,tag:'test',deny\"" |
| 240 | + ] |
161 | 241 | } |
162 | 242 | ] |
0 commit comments