~ubuntu-branches/ubuntu/saucy/nginx/saucy-updates

« back to all changes in this revision

Viewing changes to debian/modules/naxsi/t/01naxsi_whitelists.t

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Cyril Lavier, Michael Lustfield, Kartik Mistry
  • Date: 2012-05-14 11:15:00 UTC
  • mfrom: (4.2.49 sid)
  • Revision ID: package-import@ubuntu.com-20120514111500-1y9ij7zulu9xnmry
Tags: 1.2.0-1
[Cyril Lavier]
* New upstream release. (Closes: #670306)
  + 1.2.x is stable release now.
* debian/modules/chunkin-nginx-module:
  + Updated chunkin-nginx-module to v0.23rc2-3-g85eca98.
* debian/modules/headers-more-module:
  + Updated headers-more-module to v0.17rc1-4-g33a82ed.
* debian/modules/nginx-development-kit:
  + Updated nginx-development-kit to v0.2.17-7-g24202b4.
* debian/modules/nginx-echo:
  + Updated nginx-echo to v0.38rc2-7-g080c0a1.
* debian/modules/nginx-lua:
  + Updated nginx-lua to v0.5.0rc25-5-g8d28785.
* debian/modules/nginx-upstream-fair:
  + Updated nginx-upstream-fair to a18b409.
* debian/modules/nginx-upload-progress:
  + Updated nginx-upload-progress to v0.9.0-0-ga788dea.
* debian/modules/naxsi:
  + Updated naxsi to 0.46
* debian/modules/README.Modules-versions:
  + Updated versions and URLs for modules.
* debian/naxsi-ui-extract, debian/naxsi-ui-intercept,
  debian/nginx-naxsi-ui.*, debian/naxsi-ui-extract.1,
  debian/naxsi-ui-intercept.1, debian/rules:
  + Added nginx-naxsi-ui package containing the learning daemon
    and the WebUI.
* debian/nginx-common.nginx.default, debian/nginx-common.nginx.init:
  + Renamed files to be compliant with the nginx-naxsi-ui package.
* debian/po:
  + Added needed files for using po-debconf.
  + Added French translation.
* debian/control:
  + Applied the modifications given after the review by Justin Rye.

[Michael Lustfield]
* debian/conf/uwsgi_params:
  + Added UWSGI_SCHEME to uwsgi_params. (Closes: #664878)
* debian/conf/sites-available/default:
  + Added allow directive for ipv6 localhost. (Closes: #664271)

[Kartik Mistry]
* debian/control:
  + wrap-and-sort.
* debian/copyright:
  + Added missing copyrights, minor formatting fixes.
* debian/nginx-common.nginx.init:
  + Added ulimit for restarts, Thanks to Daniel Roschka
    <danielroschka@phoenitydawn.de> for patch. (Closes: #673580)
* debian/conf/sites-available/default:
  + Added patch to fix deprecated "listen" directive, Thanks to
    Guillaume Plessis <gui@dotdeb.org> for patch. (Closes: #672632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#vi:filetype=perl
 
2
 
 
3
 
 
4
# A AJOUTER :
 
5
# TEST CASE AVEC UNE REGLE SUR UN HEADER GENERIQUE
 
6
# La même sur des arguments :)
 
7
 
 
8
use lib 'lib';
 
9
use Test::Nginx::Socket;
 
10
 
 
11
plan tests => repeat_each(2) * blocks();
 
12
no_root_location();
 
13
no_long_string();
 
14
$ENV{TEST_NGINX_SERVROOT} = server_root();
 
15
run_tests();
 
16
__DATA__
 
17
=== WL TEST 1.0: [ARGS zone WhiteList] Adding a test rule in http_config (ARGS zone) and disable rule.
 
18
--- http_config
 
19
include /etc/nginx/naxsi_core.rules;
 
20
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
21
--- config
 
22
location / {
 
23
         #LearningMode;
 
24
         SecRulesEnabled;
 
25
         DeniedUrl "/RequestDenied";
 
26
         CheckRule "$SQL >= 8" BLOCK;
 
27
         CheckRule "$RFI >= 8" BLOCK;
 
28
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
29
         CheckRule "$XSS >= 8" BLOCK;
 
30
         root $TEST_NGINX_SERVROOT/html/;
 
31
         index index.html index.htm;
 
32
         BasicRule wl:1999;
 
33
}
 
34
location /RequestDenied {
 
35
         return 412;
 
36
}
 
37
--- request
 
38
GET /?a=foobar
 
39
--- error_code: 200
 
40
=== WL TEST 1.1: Adding a test rule in http_config (ARGS zone) and WL it on arg name only.
 
41
--- http_config
 
42
include /etc/nginx/naxsi_core.rules;
 
43
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
44
--- config
 
45
location / {
 
46
         #LearningMode;
 
47
         SecRulesEnabled;
 
48
         DeniedUrl "/RequestDenied";
 
49
         CheckRule "$SQL >= 8" BLOCK;
 
50
         CheckRule "$RFI >= 8" BLOCK;
 
51
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
52
         CheckRule "$XSS >= 8" BLOCK;
 
53
         root $TEST_NGINX_SERVROOT/html/;
 
54
         index index.html index.htm;
 
55
         BasicRule wl:1999 "mz:$ARGS_VAR:a";
 
56
}
 
57
location /RequestDenied {
 
58
         return 412;
 
59
}
 
60
--- request
 
61
GET /?a=foobar
 
62
--- error_code: 200
 
63
=== WL TEST 1.2: Adding a test rule in http_config (ARGS zone) and WL it on arg name only (case sensitiveness check).
 
64
--- http_config
 
65
include /etc/nginx/naxsi_core.rules;
 
66
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
67
--- config
 
68
location / {
 
69
         #LearningMode;
 
70
         SecRulesEnabled;
 
71
         DeniedUrl "/RequestDenied";
 
72
         CheckRule "$SQL >= 8" BLOCK;
 
73
         CheckRule "$RFI >= 8" BLOCK;
 
74
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
75
         CheckRule "$XSS >= 8" BLOCK;
 
76
         root $TEST_NGINX_SERVROOT/html/;
 
77
         index index.html index.htm;
 
78
         BasicRule wl:1999 "mz:$ARGS_VAR:AbCd";
 
79
}
 
80
location /RequestDenied {
 
81
         return 412;
 
82
}
 
83
--- request
 
84
GET /?abcd=foobar
 
85
--- error_code: 200
 
86
=== WL TEST 1.3: Adding a test rule in http_config (ARGS zone) and WL it on arg name only (case sensitiveness check #2).
 
87
--- http_config
 
88
include /etc/nginx/naxsi_core.rules;
 
89
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
90
--- config
 
91
location / {
 
92
         #LearningMode;
 
93
         SecRulesEnabled;
 
94
         DeniedUrl "/RequestDenied";
 
95
         CheckRule "$SQL >= 8" BLOCK;
 
96
         CheckRule "$RFI >= 8" BLOCK;
 
97
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
98
         CheckRule "$XSS >= 8" BLOCK;
 
99
         root $TEST_NGINX_SERVROOT/html/;
 
100
         index index.html index.htm;
 
101
         BasicRule wl:1999 "mz:$ARGS_VAR:abcd";
 
102
}
 
103
location /RequestDenied {
 
104
         return 412;
 
105
}
 
106
--- request
 
107
GET /?AbCd=foobar
 
108
--- error_code: 200
 
109
=== WL TEST 1.4: Adding a test rule in http_config (ARGS zone) and WL it on $URL + ZONE.
 
110
--- http_config
 
111
include /etc/nginx/naxsi_core.rules;
 
112
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
113
--- config
 
114
location / {
 
115
         #LearningMode;
 
116
         SecRulesEnabled;
 
117
         DeniedUrl "/RequestDenied";
 
118
         CheckRule "$SQL >= 8" BLOCK;
 
119
         CheckRule "$RFI >= 8" BLOCK;
 
120
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
121
         CheckRule "$XSS >= 8" BLOCK;
 
122
         root $TEST_NGINX_SERVROOT/html/;
 
123
         index index.html index.htm;
 
124
         BasicRule wl:1999 "mz:$URL:/|ARGS";
 
125
}
 
126
location /RequestDenied {
 
127
         return 412;
 
128
}
 
129
--- request
 
130
GET /?a=foobar
 
131
--- error_code: 200
 
132
=== WL TEST 1.5: Adding a test rule in http_config (ARGS zone) and WL it on $URL + ZONE (wrong URL).
 
133
--- user_files
 
134
>>> index2
 
135
eh yo
 
136
--- http_config
 
137
include /etc/nginx/naxsi_core.rules;
 
138
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
139
--- config
 
140
location / {
 
141
         #LearningMode;
 
142
         SecRulesEnabled;
 
143
         DeniedUrl "/RequestDenied";
 
144
         CheckRule "$SQL >= 8" BLOCK;
 
145
         CheckRule "$RFI >= 8" BLOCK;
 
146
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
147
         CheckRule "$XSS >= 8" BLOCK;
 
148
         root $TEST_NGINX_SERVROOT/html/;
 
149
         index index.html index.htm;
 
150
         BasicRule wl:1999 "mz:$URL:/|ARGS";
 
151
}
 
152
location /RequestDenied {
 
153
         return 412;
 
154
}
 
155
--- request
 
156
GET /index2?a=foobar
 
157
--- error_code: 412
 
158
=== WL TEST 1.6: Adding a test rule in http_config (ARGS zone) and WL it on $URL + $ARG_VAR.
 
159
--- user_files
 
160
>>> index2
 
161
eh yo
 
162
--- http_config
 
163
include /etc/nginx/naxsi_core.rules;
 
164
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
165
--- config
 
166
location / {
 
167
         #LearningMode;
 
168
         SecRulesEnabled;
 
169
         DeniedUrl "/RequestDenied";
 
170
         CheckRule "$SQL >= 8" BLOCK;
 
171
         CheckRule "$RFI >= 8" BLOCK;
 
172
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
173
         CheckRule "$XSS >= 8" BLOCK;
 
174
         root $TEST_NGINX_SERVROOT/html/;
 
175
         index index.html index.htm;
 
176
         BasicRule wl:1999 "mz:$URL:/|$ARGS_VAR:AbCd";
 
177
}
 
178
location /RequestDenied {
 
179
         return 412;
 
180
}
 
181
--- request
 
182
GET /index2?ABCD=foobar
 
183
--- error_code: 412
 
184
=== WL TEST 2.0: Adding a rule that will match on headers
 
185
--- http_config
 
186
include /etc/nginx/naxsi_core.rules;
 
187
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
188
--- config
 
189
location / {
 
190
         #LearningMode;
 
191
         SecRulesEnabled;
 
192
         DeniedUrl "/RequestDenied";
 
193
         CheckRule "$SQL >= 8" BLOCK;
 
194
         CheckRule "$RFI >= 8" BLOCK;
 
195
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
196
         CheckRule "$XSS >= 8" BLOCK;
 
197
         root $TEST_NGINX_SERVROOT/html/;
 
198
         index index.html index.htm;
 
199
}
 
200
location /RequestDenied {
 
201
         return 412;
 
202
}
 
203
--- more_headers
 
204
Cookie: foobar
 
205
--- request
 
206
GET /
 
207
--- error_code: 412
 
208
=== WL TEST 2.1: Adding a rule that will match on headers, WL it on $HEADERS_VAR
 
209
--- http_config
 
210
include /etc/nginx/naxsi_core.rules;
 
211
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
212
--- user_files
 
213
>>> another-page
 
214
ANOTHER CONTENT
 
215
--- config
 
216
location / {
 
217
         #LearningMode;
 
218
         SecRulesEnabled;
 
219
         DeniedUrl "/RequestDenied";
 
220
         CheckRule "$SQL >= 8" BLOCK;
 
221
         CheckRule "$RFI >= 8" BLOCK;
 
222
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
223
         CheckRule "$XSS >= 8" BLOCK;
 
224
         root $TEST_NGINX_SERVROOT/html/;
 
225
         index index.html index.htm;
 
226
         BasicRule wl:1999 "mz:$HEADERS_VAR:cookie";
 
227
}
 
228
location /RequestDenied {
 
229
         return 412;
 
230
}
 
231
--- more_headers
 
232
Cookie: foobar
 
233
--- request
 
234
GET /another-page
 
235
--- error_code: 200
 
236
=== WL TEST 2.2: Adding a rule that will match on headers specific header name
 
237
--- http_config
 
238
include /etc/nginx/naxsi_core.rules;
 
239
MainRule "str:foobar" "msg:foobar test pattern" "mz:$HEADERS_VAR:cookie" "s:$SQL:42" id:1999;
 
240
--- user_files
 
241
>>> another-page
 
242
ANOTHER CONTENT
 
243
--- config
 
244
location / {
 
245
         #LearningMode;
 
246
         SecRulesEnabled;
 
247
         DeniedUrl "/RequestDenied";
 
248
         CheckRule "$SQL >= 8" BLOCK;
 
249
         CheckRule "$RFI >= 8" BLOCK;
 
250
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
251
         CheckRule "$XSS >= 8" BLOCK;
 
252
         root $TEST_NGINX_SERVROOT/html/;
 
253
         index index.html index.htm;
 
254
}
 
255
location /RequestDenied {
 
256
         return 412;
 
257
}
 
258
--- more_headers
 
259
COOKIE: foobar
 
260
--- request
 
261
GET /another-page
 
262
--- error_code: 412
 
263
=== WL TEST 2.3: Adding a rule that will match on headers, WL it by $URL + zone
 
264
--- http_config
 
265
include /etc/nginx/naxsi_core.rules;
 
266
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
267
--- user_files
 
268
>>> another-page
 
269
ANOTHER CONTENT
 
270
--- config
 
271
location / {
 
272
         #LearningMode;
 
273
         SecRulesEnabled;
 
274
         DeniedUrl "/RequestDenied";
 
275
         CheckRule "$SQL >= 8" BLOCK;
 
276
         CheckRule "$RFI >= 8" BLOCK;
 
277
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
278
         CheckRule "$XSS >= 8" BLOCK;
 
279
         root $TEST_NGINX_SERVROOT/html/;
 
280
         index index.html index.htm;
 
281
         BasicRule "wl:1999" "mz:$URL:/another-page|HEADERS";
 
282
}
 
283
location /RequestDenied {
 
284
         return 412;
 
285
}
 
286
--- more_headers
 
287
COOKIE: foobar
 
288
--- request
 
289
GET /another-page
 
290
--- error_code: 200
 
291
=== WL TEST 2.4 : Adding a rule that will match on headers, WL it by $URL + $HEADERS_VAR
 
292
--- http_config
 
293
include /etc/nginx/naxsi_core.rules;
 
294
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
295
--- user_files
 
296
>>> another-page
 
297
ANOTHER CONTENT
 
298
--- config
 
299
location / {
 
300
         #LearningMode;
 
301
         SecRulesEnabled;
 
302
         DeniedUrl "/RequestDenied";
 
303
         CheckRule "$SQL >= 8" BLOCK;
 
304
         CheckRule "$RFI >= 8" BLOCK;
 
305
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
306
         CheckRule "$XSS >= 8" BLOCK;
 
307
         root $TEST_NGINX_SERVROOT/html/;
 
308
         index index.html index.htm;
 
309
         BasicRule wl:1999 "mz:$URL:/another-page|$HEADERS_VAR:cookie";
 
310
}
 
311
location /RequestDenied {
 
312
         return 412;
 
313
}
 
314
--- more_headers
 
315
COOKIE: foobar
 
316
--- request
 
317
GET /another-page
 
318
--- error_code: 200
 
319
=== WL TEST 2.5 : Adding a rule that will match on headers, WL it by $URL + $HEADERS_VAR (WRONG URL)
 
320
--- http_config
 
321
include /etc/nginx/naxsi_core.rules;
 
322
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
323
--- user_files
 
324
>>> another-page
 
325
ANOTHER CONTENT
 
326
--- config
 
327
location / {
 
328
         #LearningMode;
 
329
         SecRulesEnabled;
 
330
         DeniedUrl "/RequestDenied";
 
331
         CheckRule "$SQL >= 8" BLOCK;
 
332
         CheckRule "$RFI >= 8" BLOCK;
 
333
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
334
         CheckRule "$XSS >= 8" BLOCK;
 
335
         root $TEST_NGINX_SERVROOT/html/;
 
336
         index index.html index.htm;
 
337
         BasicRule wl:1999 "mz:$URL:/another-page|$HEADERS_VAR:cookie";
 
338
}
 
339
location /RequestDenied {
 
340
         return 412;
 
341
}
 
342
--- more_headers
 
343
COOKIE: foobar
 
344
--- request
 
345
GET /another-pag
 
346
--- error_code: 412
 
347
=== WL TEST 2.6 : Adding a rule that will match on headers, WL it by $URL + $HEADERS_VAR (WRONG HEADER NAME)
 
348
--- http_config
 
349
include /etc/nginx/naxsi_core.rules;
 
350
MainRule "str:foobar" "msg:foobar test pattern" "mz:HEADERS" "s:$SQL:42" id:1999;
 
351
--- user_files
 
352
>>> another-page
 
353
ANOTHER CONTENT
 
354
--- config
 
355
location / {
 
356
         #LearningMode;
 
357
         SecRulesEnabled;
 
358
         DeniedUrl "/RequestDenied";
 
359
         CheckRule "$SQL >= 8" BLOCK;
 
360
         CheckRule "$RFI >= 8" BLOCK;
 
361
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
362
         CheckRule "$XSS >= 8" BLOCK;
 
363
         root $TEST_NGINX_SERVROOT/html/;
 
364
         index index.html index.htm;
 
365
         BasicRule wl:1999 "mz:$URL:/another-page|$HEADERS_VAR:cookie";
 
366
}
 
367
location /RequestDenied {
 
368
         return 412;
 
369
}
 
370
--- more_headers
 
371
COOKI: foobar
 
372
--- request
 
373
GET /another-page
 
374
--- error_code: 412
 
375
=== URL WL TEST 3.0: Adding a test rule on ARGS (testing case sensitivness)
 
376
--- user_files
 
377
>>> foobar
 
378
eh yo
 
379
--- http_config
 
380
include /etc/nginx/naxsi_core.rules;
 
381
MainRule "str:bra" "msg:test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
382
--- config
 
383
location / {
 
384
         #LearningMode;
 
385
         SecRulesEnabled;
 
386
         DeniedUrl "/RequestDenied";
 
387
         CheckRule "$SQL >= 8" BLOCK;
 
388
         CheckRule "$RFI >= 8" BLOCK;
 
389
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
390
         CheckRule "$XSS >= 8" BLOCK;
 
391
         root $TEST_NGINX_SERVROOT/html/;
 
392
         index index.html index.htm;
 
393
}
 
394
location /RequestDenied {
 
395
         return 412;
 
396
}
 
397
--- request
 
398
GET /foobar?a=BrA
 
399
--- error_code: 412
 
400
=== URL WL TEST 3.1: Adding a test rule on ARGS (testing case sensitivness #2)
 
401
--- user_files
 
402
>>> foobar
 
403
eh yo
 
404
--- http_config
 
405
include /etc/nginx/naxsi_core.rules;
 
406
MainRule "str:BrA" "msg:test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
407
--- config
 
408
location / {
 
409
         #LearningMode;
 
410
         SecRulesEnabled;
 
411
         DeniedUrl "/RequestDenied";
 
412
         CheckRule "$SQL >= 8" BLOCK;
 
413
         CheckRule "$RFI >= 8" BLOCK;
 
414
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
415
         CheckRule "$XSS >= 8" BLOCK;
 
416
         root $TEST_NGINX_SERVROOT/html/;
 
417
         index index.html index.htm;
 
418
}
 
419
location /RequestDenied {
 
420
         return 412;
 
421
}
 
422
--- request
 
423
GET /foobar?a=bRa
 
424
--- error_code: 412
 
425
=== URL WL TEST 3.2: Adding a test rule on URI (testing case sensitivness #2)
 
426
--- user_files
 
427
>>> foobar
 
428
eh yo
 
429
--- http_config
 
430
include /etc/nginx/naxsi_core.rules;
 
431
MainRule "str:BrA" "msg:test pattern" "mz:$URL:/foobar|ARGS" "s:$SQL:42" id:1999;
 
432
--- config
 
433
location / {
 
434
         #LearningMode;
 
435
         SecRulesEnabled;
 
436
         DeniedUrl "/RequestDenied";
 
437
         CheckRule "$SQL >= 8" BLOCK;
 
438
         CheckRule "$RFI >= 8" BLOCK;
 
439
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
440
         CheckRule "$XSS >= 8" BLOCK;
 
441
         root $TEST_NGINX_SERVROOT/html/;
 
442
         index index.html index.htm;
 
443
}
 
444
location /RequestDenied {
 
445
         return 412;
 
446
}
 
447
--- request
 
448
GET /FoObar?a=bRa
 
449
--- error_code: 412
 
450
=== WL TEST 5.0: Testing the POST content-type rule !
 
451
--- user_files
 
452
>>> foobar
 
453
eh yo
 
454
--- http_config
 
455
include /etc/nginx/naxsi_core.rules;
 
456
MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" "msg:Content is neither mulipart/x-www-form.." "mz:$HEADERS_VAR:Content-typz" "s:BLOCK" id:1402;
 
457
--- config
 
458
location / {
 
459
         #LearningMode;
 
460
         SecRulesEnabled;
 
461
         DeniedUrl "/RequestDenied";
 
462
         CheckRule "$SQL >= 8" BLOCK;
 
463
         CheckRule "$RFI >= 8" BLOCK;
 
464
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
465
         CheckRule "$XSS >= 8" BLOCK;
 
466
         root $TEST_NGINX_SERVROOT/html/;
 
467
         index index.html index.htm;
 
468
         error_page 405 = $uri;
 
469
}
 
470
location /RequestDenied {
 
471
         return 412;
 
472
}
 
473
--- more_headers
 
474
Content-Typz: application/x-www-form-urlencoded
 
475
Content-Type: application/x-www-form-urlencoded
 
476
--- request eval
 
477
use URI::Escape;
 
478
"POST /foobar
 
479
foo1=bar1&foo2=bar2"
 
480
--- error_code: 200
 
481
=== WL TEST 5.1: Testing the POST content-type rule #2
 
482
--- user_files
 
483
>>> foobar
 
484
eh yo
 
485
--- http_config
 
486
include /etc/nginx/naxsi_core.rules;
 
487
MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" "msg:Content is neither mulipart/x-www-form.." "mz:$HEADERS_VAR:content-typz" "s:BLOCK" id:1999;
 
488
--- config
 
489
location / {
 
490
         #LearningMode;
 
491
         SecRulesEnabled;
 
492
         DeniedUrl "/RequestDenied";
 
493
         CheckRule "$SQL >= 8" BLOCK;
 
494
         CheckRule "$RFI >= 8" BLOCK;
 
495
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
496
         CheckRule "$XSS >= 8" BLOCK;
 
497
         root $TEST_NGINX_SERVROOT/html/;
 
498
         index index.html index.htm;
 
499
         error_page 405 = $uri;
 
500
}
 
501
location /RequestDenied {
 
502
         return 412;
 
503
}
 
504
--- more_headers
 
505
Content-Type: application/x-www-form-urlencoded
 
506
Content-Typz: application/z-www-form-urlencoded
 
507
--- request eval
 
508
use URI::Escape;
 
509
"POST /foobar
 
510
foo1=bar1&foo2=bar2"
 
511
--- error_code: 412
 
512
=== WL TEST 5.1: Testing the POST content-type rule #3
 
513
--- user_files
 
514
>>> foobar
 
515
eh yo
 
516
--- http_config
 
517
include /etc/nginx/naxsi_core.rules;
 
518
MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" "msg:Content is neither mulipart/x-www-form.." "mz:$HEADERS_VAR:content-typz" "s:BLOCK" id:1999;
 
519
--- config
 
520
location / {
 
521
         #LearningMode;
 
522
         SecRulesEnabled;
 
523
         DeniedUrl "/RequestDenied";
 
524
         CheckRule "$SQL >= 8" BLOCK;
 
525
         CheckRule "$RFI >= 8" BLOCK;
 
526
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
527
         CheckRule "$XSS >= 8" BLOCK;
 
528
         root $TEST_NGINX_SERVROOT/html/;
 
529
         index index.html index.htm;
 
530
         error_page 405 = $uri;
 
531
}
 
532
location /RequestDenied {
 
533
         return 412;
 
534
}
 
535
--- more_headers
 
536
Content-Type: application/x-www-form-urlencoded
 
537
cOnTeNT-TYpZ: application/x-www-form-evilencoded
 
538
--- request eval
 
539
use URI::Escape;
 
540
"POST /foobar
 
541
foo1=bar1&foo2=bar2"
 
542
--- error_code: 412
 
543
=== WL TEST 5: Adding a test rule in http_config (ARGS zone) and WL it on url + wrong arg name.
 
544
--- user_files
 
545
>>> foobar
 
546
eh yo
 
547
--- http_config
 
548
include /etc/nginx/naxsi_core.rules;
 
549
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
550
--- config
 
551
location / {
 
552
         #LearningMode;
 
553
         SecRulesEnabled;
 
554
         DeniedUrl "/RequestDenied";
 
555
         CheckRule "$SQL >= 8" BLOCK;
 
556
         CheckRule "$RFI >= 8" BLOCK;
 
557
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
558
         CheckRule "$XSS >= 8" BLOCK;
 
559
         root $TEST_NGINX_SERVROOT/html/;
 
560
         index index.html index.htm;
 
561
         BasicRule wl:1999 "mz:$URL:/foobar|$ARGS_VAR:barone";
 
562
}
 
563
location /RequestDenied {
 
564
         return 412;
 
565
}
 
566
--- request
 
567
GET /foobar?baron=foobar
 
568
--- error_code: 412
 
569
=== WL TEST 6: Adding a test rule in http_config (ARGS zone) and WL it.
 
570
--- http_config
 
571
include /etc/nginx/naxsi_core.rules;
 
572
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
573
--- config
 
574
location / {
 
575
         #LearningMode;
 
576
         SecRulesEnabled;
 
577
         DeniedUrl "/RequestDenied";
 
578
         CheckRule "$SQL >= 8" BLOCK;
 
579
         CheckRule "$RFI >= 8" BLOCK;
 
580
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
581
         CheckRule "$XSS >= 8" BLOCK;
 
582
         root $TEST_NGINX_SERVROOT/html/;
 
583
         index index.html index.htm;
 
584
         BasicRule wl:1999;
 
585
}
 
586
location /RequestDenied {
 
587
         return 412;
 
588
}
 
589
--- request
 
590
GET /?a=foobar
 
591
--- error_code: 200
 
592
=== WL TEST 7: Adding a test rule in http_config (URL zone) and WL it on url + zone.
 
593
--- user_files
 
594
>>> foobar
 
595
eh yo
 
596
--- http_config
 
597
include /etc/nginx/naxsi_core.rules;
 
598
MainRule "str:foobar" "msg:foobar test pattern" "mz:URL" "s:$SQL:42" id:1999;
 
599
--- config
 
600
location / {
 
601
         #LearningMode;
 
602
         SecRulesEnabled;
 
603
         DeniedUrl "/RequestDenied";
 
604
         CheckRule "$SQL >= 8" BLOCK;
 
605
         CheckRule "$RFI >= 8" BLOCK;
 
606
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
607
         CheckRule "$XSS >= 8" BLOCK;
 
608
         root $TEST_NGINX_SERVROOT/html/;
 
609
         index index.html index.htm;
 
610
         BasicRule wl:1999 "mz:$URL:/foobar|URL";
 
611
}
 
612
location /RequestDenied {
 
613
         return 412;
 
614
}
 
615
--- request
 
616
GET /foobar?aa
 
617
--- error_code: 200
 
618
=== WL TEST 8: Adding a test rule in http_config (URL zone).
 
619
--- user_files
 
620
>>> foobar
 
621
eh yo
 
622
--- http_config
 
623
include /etc/nginx/naxsi_core.rules;
 
624
MainRule "str:foobar" "msg:foobar test pattern" "mz:URL" "s:$SQL:42" id:1999;
 
625
--- config
 
626
location / {
 
627
         #LearningMode;
 
628
         SecRulesEnabled;
 
629
         DeniedUrl "/RequestDenied";
 
630
         CheckRule "$SQL >= 8" BLOCK;
 
631
         CheckRule "$RFI >= 8" BLOCK;
 
632
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
633
         CheckRule "$XSS >= 8" BLOCK;
 
634
         root $TEST_NGINX_SERVROOT/html/;
 
635
         index index.html index.htm;
 
636
}
 
637
location /RequestDenied {
 
638
         return 412;
 
639
}
 
640
--- request
 
641
GET /foobar?aa
 
642
--- error_code: 412
 
643
=== WL TEST 8.1 : Adding a test rule in http_config (URL zone) and whitelist it with $URL:|URL.
 
644
--- user_files
 
645
>>> foobar
 
646
eh yo
 
647
--- http_config
 
648
include /etc/nginx/naxsi_core.rules;
 
649
MainRule "str:foobar" "msg:foobar test pattern" "mz:URL" "s:$SQL:42" id:1999;
 
650
--- config
 
651
location / {
 
652
         #LearningMode;
 
653
         SecRulesEnabled;
 
654
         DeniedUrl "/RequestDenied";
 
655
         CheckRule "$SQL >= 8" BLOCK;
 
656
         CheckRule "$RFI >= 8" BLOCK;
 
657
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
658
         CheckRule "$XSS >= 8" BLOCK;
 
659
         root $TEST_NGINX_SERVROOT/html/;
 
660
         index index.html index.htm;
 
661
         BasicRule wl:1999 "mz:$URL:/foobar|URL";
 
662
}
 
663
location /RequestDenied {
 
664
         return 412;
 
665
}
 
666
--- request
 
667
GET /foobar?aa
 
668
--- error_code: 200
 
669
=== WL TEST 8.2 : Adding a test rule in http_config (URL zone) and whitelist it with URL and no $URL.
 
670
--- user_files
 
671
>>> foobar
 
672
eh yo
 
673
--- http_config
 
674
include /etc/nginx/naxsi_core.rules;
 
675
MainRule "str:foobar" "msg:foobar test pattern" "mz:URL" "s:$SQL:42" id:1999;
 
676
--- config
 
677
location / {
 
678
         #LearningMode;
 
679
         SecRulesEnabled;
 
680
         DeniedUrl "/RequestDenied";
 
681
         CheckRule "$SQL >= 8" BLOCK;
 
682
         CheckRule "$RFI >= 8" BLOCK;
 
683
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
684
         CheckRule "$XSS >= 8" BLOCK;
 
685
         root $TEST_NGINX_SERVROOT/html/;
 
686
         index index.html index.htm;
 
687
         BasicRule wl:1999 "mz:URL";
 
688
}
 
689
location /RequestDenied {
 
690
         return 412;
 
691
}
 
692
--- request
 
693
GET /foobar?aa
 
694
--- error_code: 200
 
695
=== WL TEST 8: Adding a test rule in http_config (ARGS zone) and WL it on url + arg name.
 
696
--- user_files
 
697
>>> foobar
 
698
eh yo
 
699
--- http_config
 
700
include /etc/nginx/naxsi_core.rules;
 
701
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
702
--- config
 
703
location / {
 
704
         #LearningMode;
 
705
         SecRulesEnabled;
 
706
         DeniedUrl "/RequestDenied";
 
707
         CheckRule "$SQL >= 8" BLOCK;
 
708
         CheckRule "$RFI >= 8" BLOCK;
 
709
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
710
         CheckRule "$XSS >= 8" BLOCK;
 
711
         root $TEST_NGINX_SERVROOT/html/;
 
712
         index index.html index.htm;
 
713
         BasicRule wl:1999 "mz:$URL:/foobar|$ARGS_VAR:barone";
 
714
}
 
715
location /RequestDenied {
 
716
         return 412;
 
717
}
 
718
--- request
 
719
GET /foobar?barone=foobar
 
720
--- error_code: 200
 
721
=== WL TEST 9: Adding a test rule in http_config (ARGS zone) and WL it on $ARGS_VAR only.
 
722
--- user_files
 
723
>>> foobar
 
724
eh yo
 
725
--- http_config
 
726
include /etc/nginx/naxsi_core.rules;
 
727
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
728
--- config
 
729
location / {
 
730
         #LearningMode;
 
731
         SecRulesEnabled;
 
732
         DeniedUrl "/RequestDenied";
 
733
         CheckRule "$SQL >= 8" BLOCK;
 
734
         CheckRule "$RFI >= 8" BLOCK;
 
735
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
736
         CheckRule "$XSS >= 8" BLOCK;
 
737
         root $TEST_NGINX_SERVROOT/html/;
 
738
         index index.html index.htm;
 
739
         BasicRule wl:1999 "mz:$ARGS_VAR:barone";
 
740
}
 
741
location /RequestDenied {
 
742
         return 412;
 
743
}
 
744
--- request
 
745
GET /foobar?barone=foobar
 
746
--- error_code: 200
 
747
=== WL TEST 10: Adding a test rule in http_config (ARGS zone) and WL it on url + wrong arg name.
 
748
--- user_files
 
749
>>> foobar
 
750
eh yo
 
751
--- http_config
 
752
include /etc/nginx/naxsi_core.rules;
 
753
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
754
--- config
 
755
location / {
 
756
         #LearningMode;
 
757
         SecRulesEnabled;
 
758
         DeniedUrl "/RequestDenied";
 
759
         CheckRule "$SQL >= 8" BLOCK;
 
760
         CheckRule "$RFI >= 8" BLOCK;
 
761
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
762
         CheckRule "$XSS >= 8" BLOCK;
 
763
         root $TEST_NGINX_SERVROOT/html/;
 
764
         index index.html index.htm;
 
765
         BasicRule wl:1999 "mz:$URL:/foobar|$ARGS_VAR:barone";
 
766
}
 
767
location /RequestDenied {
 
768
         return 412;
 
769
}
 
770
--- request
 
771
GET /foobar?baron=foobar
 
772
--- error_code: 412
 
773
=== WL TEST 11: Adding a test rule in http_config (ARGS zone) and WL it on url + wrong URL.
 
774
--- user_files
 
775
>>> foobar
 
776
eh yo
 
777
--- http_config
 
778
include /etc/nginx/naxsi_core.rules;
 
779
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
780
--- config
 
781
location / {
 
782
         #LearningMode;
 
783
         SecRulesEnabled;
 
784
         DeniedUrl "/RequestDenied";
 
785
         CheckRule "$SQL >= 8" BLOCK;
 
786
         CheckRule "$RFI >= 8" BLOCK;
 
787
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
788
         CheckRule "$XSS >= 8" BLOCK;
 
789
         root $TEST_NGINX_SERVROOT/html/;
 
790
         index index.html index.htm;
 
791
         BasicRule wl:1999 "mz:$URL:/foobar|$ARGS_VAR:barone";
 
792
}
 
793
location /RequestDenied {
 
794
         return 412;
 
795
}
 
796
--- request
 
797
GET /foobarx?baron=foobar
 
798
--- error_code: 412
 
799
=== WL TEST 12: Adding a test rule in http_config (ARGS zone) and WL it on url + wrong arg name.
 
800
--- user_files
 
801
>>> foobar
 
802
eh yo
 
803
--- http_config
 
804
include /etc/nginx/naxsi_core.rules;
 
805
MainRule "str:foobar" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:42" id:1999;
 
806
--- config
 
807
location / {
 
808
         #LearningMode;
 
809
         SecRulesEnabled;
 
810
         DeniedUrl "/RequestDenied";
 
811
         CheckRule "$SQL >= 8" BLOCK;
 
812
         CheckRule "$RFI >= 8" BLOCK;
 
813
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
814
         CheckRule "$XSS >= 8" BLOCK;
 
815
         root $TEST_NGINX_SERVROOT/html/;
 
816
         index index.html index.htm;
 
817
         BasicRule wl:1999 "mz:$URL:/foobar|$ARGS_VAR:barone";
 
818
}
 
819
location /RequestDenied {
 
820
         return 412;
 
821
}
 
822
--- request
 
823
GET /foobar?baron=foobar
 
824
--- error_code: 412
 
825
=== WL TEST 13: Whitelisting multiple rules in one WL.
 
826
--- user_files
 
827
>>> foobar
 
828
eh yo
 
829
--- http_config
 
830
include /etc/nginx/naxsi_core.rules;
 
831
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1999;
 
832
MainRule "str:yestwo" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1998;
 
833
--- config
 
834
location / {
 
835
         #LearningMode;
 
836
         SecRulesEnabled;
 
837
         DeniedUrl "/RequestDenied";
 
838
         CheckRule "$SQL >= 8" BLOCK;
 
839
         CheckRule "$RFI >= 8" BLOCK;
 
840
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
841
         CheckRule "$XSS >= 8" BLOCK;
 
842
         root $TEST_NGINX_SERVROOT/html/;
 
843
         index index.html index.htm;
 
844
}
 
845
location /RequestDenied {
 
846
         return 412;
 
847
}
 
848
--- request
 
849
GET /?a=yesone&b=yestwo
 
850
--- error_code: 412
 
851
=== WL TEST 14 : Whitelist on ARG_NAME.
 
852
--- user_files
 
853
>>> foobar
 
854
eh yo
 
855
--- http_config
 
856
include /etc/nginx/naxsi_core.rules;
 
857
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1999;
 
858
--- config
 
859
location / {
 
860
         #LearningMode;
 
861
         SecRulesEnabled;
 
862
         DeniedUrl "/RequestDenied";
 
863
         BasicRule wl:1999 "mz:$ARGS_VAR:b";
 
864
         CheckRule "$SQL >= 8" BLOCK;
 
865
         CheckRule "$RFI >= 8" BLOCK;
 
866
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
867
         CheckRule "$XSS >= 8" BLOCK;
 
868
         root $TEST_NGINX_SERVROOT/html/;
 
869
         index index.html index.htm;
 
870
}
 
871
location /RequestDenied {
 
872
         return 412;
 
873
}
 
874
--- request
 
875
GET /?b=yestwo
 
876
--- error_code: 200
 
877
=== WL TEST 14.1 : Whitelist on ARG_NAME.
 
878
--- user_files
 
879
>>> foobar
 
880
eh yo
 
881
--- http_config
 
882
include /etc/nginx/naxsi_core.rules;
 
883
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:BLOCK" id:1999;
 
884
--- config
 
885
location / {
 
886
         #LearningMode;
 
887
         SecRulesEnabled;
 
888
         DeniedUrl "/RequestDenied";
 
889
         CheckRule "$SQL >= 8" BLOCK;
 
890
         CheckRule "$RFI >= 8" BLOCK;
 
891
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
892
         CheckRule "$XSS >= 8" BLOCK;
 
893
         root $TEST_NGINX_SERVROOT/html/;
 
894
         index index.html index.htm;
 
895
         BasicRule wl:1002 "mz:ARGS";
 
896
}
 
897
location /RequestDenied {
 
898
         return 412;
 
899
}
 
900
--- request
 
901
GET /?b=yesone
 
902
--- error_code: 412
 
903
=== WL TEST 15 : Whitelisting multiple rules in one WL.
 
904
--- user_files
 
905
>>> foobar
 
906
eh yo
 
907
--- http_config
 
908
include /etc/nginx/naxsi_core.rules;
 
909
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1999;
 
910
MainRule "str:yestwo" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1998;
 
911
--- config
 
912
location / {
 
913
         #LearningMode;
 
914
         SecRulesEnabled;
 
915
         DeniedUrl "/RequestDenied";
 
916
         CheckRule "$SQL >= 8" BLOCK;
 
917
         CheckRule "$RFI >= 8" BLOCK;
 
918
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
919
         CheckRule "$XSS >= 8" BLOCK;
 
920
         root $TEST_NGINX_SERVROOT/html/;
 
921
         index index.html index.htm;
 
922
         BasicRule wl:1999,1998;
 
923
}
 
924
location /RequestDenied {
 
925
         return 412;
 
926
}
 
927
--- request
 
928
GET /?a=yesone&b=yestwo
 
929
--- error_code: 200
 
930
=== WL TEST 16 : Whitelisting all rules on one arg (wl:0).
 
931
--- user_files
 
932
>>> foobar
 
933
eh yo
 
934
--- http_config
 
935
include /etc/nginx/naxsi_core.rules;
 
936
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1999;
 
937
MainRule "str:yestwo" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1998;
 
938
--- config
 
939
location / {
 
940
         #LearningMode;
 
941
         SecRulesEnabled;
 
942
         DeniedUrl "/RequestDenied";
 
943
         CheckRule "$SQL >= 8" BLOCK;
 
944
         CheckRule "$RFI >= 8" BLOCK;
 
945
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
946
         CheckRule "$XSS >= 8" BLOCK;
 
947
         BasicRule wl:0 "mz:$ARGS_VAR:a";
 
948
         root $TEST_NGINX_SERVROOT/html/;
 
949
         index index.html index.htm;
 
950
}
 
951
location /RequestDenied {
 
952
         return 412;
 
953
}
 
954
--- request
 
955
GET /?a=yesoneyestwo
 
956
--- error_code: 200
 
957
=== WL TEST 17 : Whitelisting all rules on one arg (wl:0) NOT.
 
958
--- user_files
 
959
>>> foobar
 
960
eh yo
 
961
--- http_config
 
962
include /etc/nginx/naxsi_core.rules;
 
963
MainRule "str:yesone" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1999;
 
964
MainRule "str:yestwo" "msg:foobar test pattern" "mz:ARGS" "s:$SQL:4" id:1998;
 
965
--- config
 
966
location / {
 
967
         #LearningMode;
 
968
         SecRulesEnabled;
 
969
         DeniedUrl "/RequestDenied";
 
970
         CheckRule "$SQL >= 8" BLOCK;
 
971
         CheckRule "$RFI >= 8" BLOCK;
 
972
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
973
         CheckRule "$XSS >= 8" BLOCK;
 
974
         root $TEST_NGINX_SERVROOT/html/;
 
975
         index index.html index.htm;
 
976
}
 
977
location /RequestDenied {
 
978
         return 412;
 
979
}
 
980
--- request
 
981
GET /?a=yesoneyestwo
 
982
--- error_code: 412
 
983
 
 
984
=== WL TEST 18 : Whitelisting rule id 1
 
985
--- user_files
 
986
>>> foobar
 
987
eh yo
 
988
--- http_config
 
989
include /etc/nginx/naxsi_core.rules;
 
990
--- config
 
991
location / {
 
992
         #LearningMode;
 
993
         SecRulesEnabled;
 
994
         DeniedUrl "/RequestDenied";
 
995
         CheckRule "$SQL >= 8" BLOCK;
 
996
         CheckRule "$RFI >= 8" BLOCK;
 
997
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
998
         CheckRule "$XSS >= 8" BLOCK;
 
999
         root $TEST_NGINX_SERVROOT/html/;
 
1000
         index index.html index.htm;
 
1001
         error_page 405 = $uri;
 
1002
}
 
1003
location /RequestDenied {
 
1004
         return 412;
 
1005
}
 
1006
--- request
 
1007
POST /
 
1008
 
 
1009
--- error_code: 412
 
1010
=== WL TEST 18.1 : Whitelisting rule id 1
 
1011
--- user_files
 
1012
>>> foobar
 
1013
eh yo
 
1014
--- http_config
 
1015
include /etc/nginx/naxsi_core.rules;
 
1016
--- config
 
1017
location / {
 
1018
         #LearningMode;
 
1019
         SecRulesEnabled;
 
1020
         DeniedUrl "/RequestDenied";
 
1021
         CheckRule "$SQL >= 8" BLOCK;
 
1022
         CheckRule "$RFI >= 8" BLOCK;
 
1023
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
1024
         CheckRule "$XSS >= 8" BLOCK;
 
1025
         root $TEST_NGINX_SERVROOT/html/;
 
1026
         index index.html index.htm;
 
1027
         BasicRule wl:1 "mz:$URL:/|BODY";
 
1028
         error_page 405 = $uri;
 
1029
}
 
1030
location /RequestDenied {
 
1031
         return 412;
 
1032
}
 
1033
--- request
 
1034
POST /
 
1035
 
 
1036
--- error_code: 200