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

« back to all changes in this revision

Viewing changes to debian/modules/naxsi/t/03naxsi_profile.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
 
 
17
 
 
18
__DATA__
 
19
=== TEST 1: Basic GET request
 
20
--- http_config
 
21
include /etc/nginx/naxsi_core.rules;
 
22
--- config
 
23
location / {
 
24
         #LearningMode;
 
25
         SecRulesEnabled;
 
26
         DeniedUrl "/RequestDenied";
 
27
CheckRule "$SQL >= 8" BLOCK;
 
28
CheckRule "$RFI >= 8" BLOCK;
 
29
CheckRule "$TRAVERSAL >= 4" BLOCK;
 
30
CheckRule "$XSS >= 8" BLOCK;
 
31
         root $TEST_NGINX_SERVROOT/html/;
 
32
         index index.html index.htm;
 
33
}
 
34
location /RequestDenied {
 
35
         return 412;
 
36
}
 
37
--- request
 
38
GET /?a=buibui
 
39
--- error_code: 200
 
40
=== TEST 2: DENY : Obvious GET XSS
 
41
--- http_config
 
42
include /etc/nginx/naxsi_core.rules;
 
43
--- config
 
44
location / {
 
45
         #LearningMode;
 
46
         SecRulesEnabled;
 
47
         DeniedUrl "/RequestDenied";
 
48
CheckRule "$SQL >= 8" BLOCK;
 
49
CheckRule "$RFI >= 8" BLOCK;
 
50
CheckRule "$TRAVERSAL >= 4" BLOCK;
 
51
CheckRule "$XSS >= 8" BLOCK;
 
52
         root $TEST_NGINX_SERVROOT/html/;
 
53
         index index.html index.htm;
 
54
}
 
55
location /RequestDenied {
 
56
         return 412;
 
57
}
 
58
--- request
 
59
GET /?a="><ScRiPt>alert(1)</scRiPt>
 
60
--- error_code: 412
 
61
=== TEST 2.1: DENY : Obvious RFI
 
62
--- http_config
 
63
include /etc/nginx/naxsi_core.rules;
 
64
--- config
 
65
location / {
 
66
         #LearningMode;
 
67
         SecRulesEnabled;
 
68
         DeniedUrl "/RequestDenied";
 
69
CheckRule "$SQL >= 8" BLOCK;
 
70
CheckRule "$RFI >= 2" BLOCK;
 
71
CheckRule "$TRAVERSAL >= 4" BLOCK;
 
72
CheckRule "$XSS >= 8" BLOCK;
 
73
         root $TEST_NGINX_SERVROOT/html/;
 
74
         index index.html index.htm;
 
75
}
 
76
location /RequestDenied {
 
77
         return 412;
 
78
}
 
79
--- request
 
80
GET /?a=http://evil.com/eva.txt
 
81
--- error_code: 412
 
82
=== TEST 2.3: DENY : Obvious LFI
 
83
--- http_config
 
84
include /etc/nginx/naxsi_core.rules;
 
85
--- config
 
86
location / {
 
87
         #LearningMode;
 
88
         SecRulesEnabled;
 
89
         DeniedUrl "/RequestDenied";
 
90
CheckRule "$SQL >= 8" BLOCK;
 
91
CheckRule "$RFI >= 2" BLOCK;
 
92
CheckRule "$TRAVERSAL >= 4" BLOCK;
 
93
CheckRule "$XSS >= 8" BLOCK;
 
94
         root $TEST_NGINX_SERVROOT/html/;
 
95
         index index.html index.htm;
 
96
}
 
97
location /RequestDenied {
 
98
         return 412;
 
99
}
 
100
--- request
 
101
GET /?a=../../../../../bar.txt
 
102
--- error_code: 412
 
103
=== TEST 3: OBVIOUS GET SQL INJECTION
 
104
--- http_config
 
105
include /etc/nginx/naxsi_core.rules;
 
106
--- config
 
107
location / {
 
108
         #LearningMode;
 
109
         SecRulesEnabled;
 
110
         DeniedUrl "/RequestDenied";
 
111
         CheckRule "$SQL >= 8" BLOCK;
 
112
         CheckRule "$RFI >= 8" BLOCK;
 
113
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
114
         CheckRule "$XSS >= 8" BLOCK;
 
115
         root $TEST_NGINX_SERVROOT/html/;
 
116
         index index.html index.htm;
 
117
}
 
118
location /RequestDenied {
 
119
         return 412;
 
120
}
 
121
--- request
 
122
GET /?a=1'+Or+'1'='1
 
123
--- error_code: 412
 
124
=== TEST 3bis: OBVIOUS (quoteless) GET SQL INJECTION
 
125
--- http_config
 
126
include /etc/nginx/naxsi_core.rules;
 
127
--- config
 
128
location / {
 
129
         #LearningMode;
 
130
         SecRulesEnabled;
 
131
         DeniedUrl "/RequestDenied";
 
132
         CheckRule "$SQL >= 8" BLOCK;
 
133
         CheckRule "$RFI >= 8" BLOCK;
 
134
         CheckRule "$TRAVERSAL >= 4" BLOCK;
 
135
         CheckRule "$XSS >= 8" BLOCK;
 
136
         root $TEST_NGINX_SERVROOT/html/;
 
137
         index index.html index.htm;
 
138
}
 
139
location /RequestDenied {
 
140
         return 412;
 
141
}
 
142
--- request
 
143
GET /?a=1+UnIoN+SeLeCt+1
 
144
--- error_code: 412