Skip to content

Commit b294061

Browse files
author
Felipe Zimmerle
committed
Adds Status test case with the SecServerSignature being used
If SecServerSignature is used ModSecurity should send the real data, not the one informed to SecServerSignature. Originally reported by: Linas
1 parent 2c991c5 commit b294061

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/regression/misc/20-status-engine.pl renamed to tests/regression/misc/20-status-engine.t

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,28 @@
4646
"arg1=val1&arg2=val2",
4747
),
4848
},
49+
# On and SecServerSignature
50+
{
51+
type => "misc",
52+
comment => "SecStatusEngine On using SecServerSignature",
53+
conf => qq(
54+
SecRuleEngine On
55+
SecServerSignature "SpiderServer v0.1a"
56+
SecStatusEngine On
57+
),
58+
match_log => {
59+
error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1],
60+
-error => [ qr/StatusEngine call: .*SpiderServer v0.1a.*/, 1],
61+
},
62+
match_response => {
63+
status => qr/^200$/,
64+
},
65+
request => new HTTP::Request(
66+
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
67+
[
68+
"Content-Type" => "application/x-www-form-urlencoded",
69+
],
70+
"arg1=val1&arg2=val2",
71+
),
72+
},
4973

0 commit comments

Comments
 (0)