ModSecurity/tests/regression/rule/01-python-script.t
Felipe Zimmerle 2440a23921 Adds support to Python scripts on ModSecurity core.
Analog of what we have for Lua, Python support is now added by this commit.
This is very experimental.
2014-09-29 14:34:03 -07:00

25 lines
511 B
Perl

### Test for SecRuleScript
# Python
{
type => "rule",
comment => "SecRuleScript (Python match)",
conf => qq(
SecRuleEngine On
SecDebugLog $ENV{DEBUG_LOG}
SecDebugLogLevel 9
SecRuleScript "script.py" "phase:2,deny"
),
match_log => {
-error => [ qr/Python script matched\./, 1 ],
debug => [ qr/Python test message\./, 1 ],
},
match_response => {
status => qr/^200$/,
},
request => new HTTP::Request(
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt?foo=bar&foo2=bar2",
),
}