From cee205b109f33dcaa887075def9f48117e0f75b1 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Wed, 16 Apr 2014 11:43:22 -0700 Subject: [PATCH] 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 --- ...20-status-engine.pl => 20-status-engine.t} | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) rename tests/regression/misc/{20-status-engine.pl => 20-status-engine.t} (65%) diff --git a/tests/regression/misc/20-status-engine.pl b/tests/regression/misc/20-status-engine.t similarity index 65% rename from tests/regression/misc/20-status-engine.pl rename to tests/regression/misc/20-status-engine.t index 5fffe79b..4ca1da94 100644 --- a/tests/regression/misc/20-status-engine.pl +++ b/tests/regression/misc/20-status-engine.t @@ -46,4 +46,28 @@ "arg1=val1&arg2=val2", ), }, +# On and SecServerSignature +{ + type => "misc", + comment => "SecStatusEngine On using SecServerSignature", + conf => qq( + SecRuleEngine On + SecServerSignature "SpiderServer v0.1a" + SecStatusEngine On + ), + match_log => { + error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], + -error => [ qr/StatusEngine call: .*SpiderServer v0.1a.*/, 1], + }, + match_response => { + status => qr/^200$/, + }, + request => new HTTP::Request( + POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", + [ + "Content-Type" => "application/x-www-form-urlencoded", + ], + "arg1=val1&arg2=val2", + ), +},