|
Packit Service |
384592 |
### SecDebug* directive tests
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLog (pos)",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 9
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/./, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^200$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLog (neg)",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
-debug => [ qr/./, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^200$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 0",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 0
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "." "phase:1,deny,id:500241"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
-debug => [ qr/./, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 1",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 1
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500242"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[[1]\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[2-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 2",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine DetectionOnly
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 2
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500243"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[2\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[3-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^200$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 3",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 3
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500244"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[3\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[4-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 4",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 4
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500245"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[4\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[5-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 5",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 5
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500246"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[5\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[6-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 6",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 6
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500247"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[6\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[7-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 7",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 7
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500248"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[7\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[[8-9]\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 8",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 8
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500249"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[8\] /, 1 ],
|
|
Packit Service |
384592 |
-debug => [ qr/\]\[9\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
{
|
|
Packit Service |
384592 |
type => "config",
|
|
Packit Service |
384592 |
comment => "SecDebugLogLevel 9",
|
|
Packit Service |
384592 |
conf => qq(
|
|
Packit Service |
384592 |
SecRuleEngine On
|
|
Packit Service |
384592 |
SecDebugLog $ENV{DEBUG_LOG}
|
|
Packit Service |
384592 |
SecDebugLogLevel 9
|
|
Packit Service |
384592 |
SecRuleScript "test.lua" "phase:1"
|
|
Packit Service |
384592 |
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500250"
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
match_log => {
|
|
Packit Service |
384592 |
debug => [ qr/\]\[9\] /, 1 ],
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
match_response => {
|
|
Packit Service |
384592 |
status => qr/^403$/,
|
|
Packit Service |
384592 |
},
|
|
Packit Service |
384592 |
request => new HTTP::Request(
|
|
Packit Service |
384592 |
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
|
|
Packit Service |
384592 |
[
|
|
Packit Service |
384592 |
"Content-Type" => "application/x-www-form-urlencoded",
|
|
Packit Service |
384592 |
],
|
|
Packit Service |
384592 |
"a=1&b=2",
|
|
Packit Service |
384592 |
),
|
|
Packit Service |
384592 |
},
|