Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitddb4fce

Browse files
author
Felipe Zimmerle
committed
Tests: fixes regression/rule/20-exceptions.t
Tests were failing because they were writing wrong/outdated.
1 parent0c99063 commitddb4fce

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

‎tests/regression/rule/20-exceptions.t‎

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
SecRuleEngine On
99
SecDebugLog$ENV{DEBUG_LOG}
1010
SecDebugLogLevel9
11-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1"
12-
SecRuleRemoveById1
11+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:101010"
12+
SecRuleRemoveById101010
1313
),
1414
match_log=> {
15-
-error=> [ qr/ModSecurity:/,1 ],
15+
-error=> [ qr/101010/,1 ],
1616
-audit=> [ qr/./,1 ],
1717
debug=> [ qr/Starting phase REQUEST_HEADERS\..*This phase consistsof0 rule.*Starting phase RESPONSE_HEADERS\./s,1 ],
1818
-debug=> [ qr/Access denied/,1 ],
@@ -31,13 +31,13 @@
3131
SecRuleEngine On
3232
SecDebugLog$ENV{DEBUG_LOG}
3333
SecDebugLogLevel9
34-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1"
35-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:2"
36-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:3"
37-
SecRuleRemoveById123
34+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:101010"
35+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:202020"
36+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:303030"
37+
SecRuleRemoveById101010202020303030
3838
),
3939
match_log=> {
40-
-error=> [ qr/ModSecurity:/,1 ],
40+
-error=> [ qr/101010|202020|303030/,1 ],
4141
-audit=> [ qr/./,1 ],
4242
debug=> [ qr/Starting phase REQUEST_HEADERS\..*This phase consistsof0 rule.*Starting phase RESPONSE_HEADERS\./s,1 ],
4343
-debug=> [ qr/Access denied/,1 ],
@@ -56,13 +56,13 @@
5656
SecRuleEngine On
5757
SecDebugLog$ENV{DEBUG_LOG}
5858
SecDebugLogLevel9
59-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1"
60-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:2"
61-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:3"
62-
SecRuleRemoveById1-3
59+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:101010"
60+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:202020"
61+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:303030"
62+
SecRuleRemoveById101010-303030
6363
),
6464
match_log=> {
65-
-error=> [ qr/ModSecurity:/,1 ],
65+
-error=> [ qr/101010|202020|303030/,1 ],
6666
-audit=> [ qr/./,1 ],
6767
debug=> [ qr/Starting phase REQUEST_HEADERS\..*This phase consistsof0 rule.*Starting phase RESPONSE_HEADERS\./s,1 ],
6868
-debug=> [ qr/Access denied/,1 ],
@@ -81,14 +81,14 @@
8181
SecRuleEngine On
8282
SecDebugLog$ENV{DEBUG_LOG}
8383
SecDebugLogLevel9
84-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1"
85-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:2"
86-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:3"
87-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:4"
88-
SecRuleRemoveById12-4
84+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:101010"
85+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:202020"
86+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:303030"
87+
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:404040"
88+
SecRuleRemoveById101010202020-404040
8989
),
9090
match_log=> {
91-
-error=> [ qr/ModSecurity:/,1 ],
91+
-error=> [ qr/101010|202020|303030|404040/,1 ],
9292
-audit=> [ qr/./,1 ],
9393
debug=> [ qr/Starting phase REQUEST_HEADERS\..*This phase consistsof0 rule.*Starting phase RESPONSE_HEADERS\./s,1 ],
9494
-debug=> [ qr/Access denied/,1 ],
@@ -109,11 +109,11 @@
109109
SecRuleEngine On
110110
SecDebugLog$ENV{DEBUG_LOG}
111111
SecDebugLogLevel9
112-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1,msg:'testing rule',id:500001"
112+
SecRule REQUEST_URI"test""phase:1,deny,status:500,msg:'testing rule',id:500001"
113113
SecRuleRemoveByMsg"testing rule"
114114
),
115115
match_log=> {
116-
-error=> [ qr/ModSecurity:/,1 ],
116+
-error=> [ qr/500001/,1 ],
117117
-audit=> [ qr/./,1 ],
118118
debug=> [ qr/Starting phase REQUEST_HEADERS\..*This phase consistsof0 rule.*Starting phase RESPONSE_HEADERS\./s,1 ],
119119
-debug=> [ qr/Access denied/,1 ],
@@ -134,13 +134,13 @@
134134
SecRuleEngine On
135135
SecDebugLog$ENV{DEBUG_LOG}
136136
SecDebugLogLevel9
137-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1,msg:'testing rule',id:500002"
138-
SecRuleUpdateActionById1"pass,nolog"
137+
SecRule REQUEST_URI"test""phase:1,deny,status:500,msg:'testing rule',id:500002"
138+
SecRuleUpdateActionById500002"pass,nolog"
139139
),
140140
match_log=> {
141-
-error=> [ qr/ModSecurity:/,1 ],
141+
-error=> [ qr/500002/,1 ],
142142
-audit=> [ qr/./,1 ],
143-
debug=> [ qr/id:1,.*,pass,nolog/,1 ],
143+
debug=> [ qr/id:500002,pass,nolog/,1 ],
144144
-debug=> [ qr/Access denied/,1 ],
145145
},
146146
match_response=> {
@@ -157,14 +157,14 @@
157157
SecRuleEngine On
158158
SecDebugLog$ENV{DEBUG_LOG}
159159
SecDebugLogLevel9
160-
SecRule REQUEST_URI"test""phase:1,deny,status:500,id:1,msg:'testing rule',chain,id:500003"
161-
SecRule ARGS"bar,id:500004"
162-
SecRuleUpdateActionById1"pass,nolog"
160+
SecRule REQUEST_URI"test""phase:1,deny,status:500,msg:'testing rule',chain,id:500003"
161+
SecRule ARGS"bar"
162+
SecRuleUpdateActionById500003"pass,nolog"
163163
),
164164
match_log=> {
165-
-error=> [ qr/ModSecurity:/,1 ],
165+
-error=> [ qr/500003/,1 ],
166166
-audit=> [ qr/./,1 ],
167-
debug=> [ qr/id:1,.*,pass,nolog/,1 ],
167+
debug=> [ qr/id:500003,pass,nolog/,1 ],
168168
-debug=> [ qr/Access denied/,1 ],
169169
},
170170
match_response=> {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp