diff --git a/tests/regression/misc/20-status-engine.t b/tests/regression/misc/20-status-engine.t deleted file mode 100644 index e0cef4a2..00000000 --- a/tests/regression/misc/20-status-engine.t +++ /dev/null @@ -1,123 +0,0 @@ -### Test the SecStatusEngine - -## On -#{ -# type => "misc", -# comment => "Setting SecStatusEngine to On", -# conf => qq( -# SecRuleEngine On -# SecStatusEngine On -# ), -# match_log => { -# error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], -# -error => [ qr/Status engine is currently disabled, enable it by set SecStatusEngine to On/, 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", -# ), -#}, -# Off -{ - type => "misc", - comment => "Setting SecStatusEngine to Off", - conf => qq( - SecRuleEngine On - SecStatusEngine Off - ), - match_log => { - -error => [ qr/ModSecurity: StatusEngine call successfully sent/, 1], - error => [ qr/Status engine is currently disabled, enable it by set SecStatusEngine to On/, 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", - ), -}, -## 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", -# ), -#}, -## On and SecServerSignature -#{ -# type => "misc", -# comment => "SecStatusEngine On/SecServerSignature - checking signature", -# conf => qq( -# SecRuleEngine On -# SecServerSignature "SpiderServer v0.1a" -# SecStatusEngine On -# ), -# match_log => { -# error => { -# apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], -# nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 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", -# ), -#}, -## On and SecServerSignature -#{ -# type => "misc", -# comment => "SecStatusEngine On - checking signature", -# conf => qq( -# SecStatusEngine On -# ), -# match_log => { -# error => { -# apache => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1], -# nginx => [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 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", -# ), -#}, - diff --git a/tests/regression/misc/40-secRemoteRules.t.in b/tests/regression/misc/40-secRemoteRules.t.in deleted file mode 100644 index ee447771..00000000 --- a/tests/regression/misc/40-secRemoteRules.t.in +++ /dev/null @@ -1,45 +0,0 @@ -### SecRemoteRules -# probably no need these anymore -# plus it's hard to set up an infrastucture -# -#{ -# type => "misc", -# comment => "SecRemoteRules load", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRules 123 "https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt" -# ), -# match_log => { -# error => [ qr/ModSecurity: Loaded 1 rule/, 1], -# }, -#}, -#{ -# type => "misc", -# comment => "SecRemoteRules apply some remote rules", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRules 123 "https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt" -# ), -# match_log => { -# error => [ qr/ModSecurity: Warning. Matched phrase \"127.0.0.1\" at REQUEST_FILENAME./, 1], -# debug => [ qr/Matched phrase \"127.0.0.1\" at REQUEST_FILENAME/, 1 ], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, - diff --git a/tests/regression/misc/50-ipmatchfromfile-external.t.in b/tests/regression/misc/50-ipmatchfromfile-external.t.in deleted file mode 100644 index c3f9f024..00000000 --- a/tests/regression/misc/50-ipmatchfromfile-external.t.in +++ /dev/null @@ -1,73 +0,0 @@ -### ipMatchFromFile external resource -# no infrasturcure to test -# -# permanently suspended -#{ -# type => "misc", -# comment => "ipMatchFromFile", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRule REMOTE_ADDR "\@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test.txt" "id:10500,pass" -# ), -# match_log => { -# error => [ qr/ModSecurity: Warning. IPmatchFromFile: \"127.0.0.1\" matched at REMOTE_ADDR./, 1], -# debug => [ qr/IPmatchFromFile: \"127.0.0.1\" matched at REMOTE_ADDR./, 1 ], -# -error => [ qr/ModSecurity: Problems loading external resources:/, 1], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, -#{ -# type => "misc", -# comment => "ipMatchFromFile - 404 download", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRulesFailAction Warn -# SecRule REMOTE_ADDR "\@ipMatchFromFile https://www.modsecurity.org/modsecurity-regression-test-404.txt" "id:10500,pass" -# ), -# match_log => { -# error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/www.modsecurity.org\/modsecurity-regression-test-404.txt\" error: HTTP response code said error./, 1], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, -#{ -# type => "misc", -# comment => "ipMatchFromFile - bad certificate name", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRulesFailAction Warn -# SecRule REMOTE_ADDR "\@ipMatchFromFile https://status.modsecurity.org/modsecurity-regression-test-huge-ip-list.txt" "id:10500,pass" -# ), -# match_log => { -# error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/status.modsecurity.org\/modsecurity-regression-test-huge-ip-list.txt\" error: [SSL peer certificate or SSH remote key was not OK.|Couldn't connect to server.]/, 1], -# }, -#}, - diff --git a/tests/regression/misc/60-pmfromfile-external.t.in b/tests/regression/misc/60-pmfromfile-external.t.in deleted file mode 100644 index f16340a6..00000000 --- a/tests/regression/misc/60-pmfromfile-external.t.in +++ /dev/null @@ -1,86 +0,0 @@ -### pmfromfile external resource -# all tests need an external infrastructure -# termporary suspended -# -#{ -# type => "misc", -# comment => "pmfromfile", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRule REQUEST_FILENAME "\@pmFromFile https://www.modsecurity.org/modsecurity-regression-test.txt" "id:'123',phase:2,log,pass,t:none" -# ), -# match_log => { -# error => [ qr/ModSecurity: Warning. Matched phrase \"127.0.0.1\" at REQUEST_FILENAME./, 1], -# debug => [ qr/Matched phrase \"127.0.0.1\" at REQUEST_FILENAME/, 1 ], -# -error => [ qr/ModSecurity: Problems loading external resources:/, 1], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, -#{ -# type => "misc", -# comment => "pmfromfile - 404 download", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRulesFailAction Warn -# SecRule REQUEST_FILENAME "\@pmFromFile https://www.modsecurity.org/modsecurity-regression-test-404.txt" "id:'123',phase:2,log,pass,t:none" -# -# ), -# match_log => { -# error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/www.modsecurity.org\/modsecurity-regression-test-404.txt\" error: HTTP response code said error./, 1], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, -#{ -# type => "misc", -# comment => "pmfromfile - bad certificate name", -# conf => qq( -# SecRuleEngine On -# SecDebugLog $ENV{DEBUG_LOG} -# SecDebugLogLevel 9 -# SecRequestBodyAccess On -# SecRemoteRulesFailAction Warn -# SecRule REQUEST_FILENAME "\@pmFromFile https://status.modsecurity.org/modsecurity-regression-test.txt" "id:'123',phase:2,log,pass,t:none" -# -# ), -# match_log => { -# error => [ qr/ModSecurity: Problems loading external resources: Failed to download: \"https:\/\/status.modsecurity.org\/modsecurity-regression-test.txt\" error: [SSL peer certificate or SSH remote key was not OK.|Couldn't connect to server.]/, 1], -# }, -# match_response => { -# status => qr/^404$/, -# }, -# request => new HTTP::Request( -# POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/127.0.0.1.html", -# [ -# "Content-Type" => "application/x-www-form-urlencoded", -# ], -# # Args -# "some_variable=-1' and 1=1 union/* foo */select load_file('/etc/passwd')--" -# ), -#}, -