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

Commitd75e443

Browse files
author
Felipe Zimmerle
committed
Adds regression test to SecStatusEngine
Just checking the error log while have SecStatusEngine set to On in a firsttest and Off in a second.
1 parenta6d9344 commitd75e443

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### Test the SecStatusEngine
2+
3+
# On
4+
{
5+
type=>"misc",
6+
comment=>"Setting SecStatusEngine to On",
7+
conf=> qq(
8+
SecRuleEngine On
9+
SecStatusEngine On
10+
),
11+
match_log=> {
12+
error=> [ qr/ModSecurity: StatusEngine call successfully sent/,1],
13+
-error=> [ qr/Status engineis currently disabled, enable itby set SecStatusEngineto On/,1],
14+
},
15+
match_response=> {
16+
status=> qr/^200$/,
17+
},
18+
request=>new HTTP::Request(
19+
POST=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
20+
[
21+
"Content-Type"=>"application/x-www-form-urlencoded",
22+
],
23+
"arg1=val1&arg2=val2",
24+
),
25+
},
26+
# Off
27+
{
28+
type=>"misc",
29+
comment=>"Setting SecStatusEngine to Off",
30+
conf=> qq(
31+
SecRuleEngine On
32+
SecStatusEngine Off
33+
),
34+
match_log=> {
35+
-error=> [ qr/ModSecurity: StatusEngine call successfully sent/,1],
36+
error=> [ qr/Status engineis currently disabled, enable itby set SecStatusEngineto On/,1],
37+
},
38+
match_response=> {
39+
status=> qr/^200$/,
40+
},
41+
request=>new HTTP::Request(
42+
POST=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
43+
[
44+
"Content-Type"=>"application/x-www-form-urlencoded",
45+
],
46+
"arg1=val1&arg2=val2",
47+
),
48+
},
49+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp