mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Fixed: Regression tests with no ID present
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
SecDebugLogLevel 9
|
||||
SecResponseBodyAccess On
|
||||
SecDefaultAction "phase:2,log,auditlog,pass"
|
||||
SecRule REQUEST_URI "." "phase:4,deny"
|
||||
SecRule REQUEST_URI "." "phase:4,deny,id:500251"
|
||||
),
|
||||
match_log => {
|
||||
audit => [ qr/./, 1 ],
|
||||
@@ -246,7 +246,7 @@
|
||||
SecRequestBodyAccess On
|
||||
SecResponseBodyAccess On
|
||||
SecAuditLogParts "ABCDEFGHIJKZ"
|
||||
SecAction "phase:4,log,auditlog,allow"
|
||||
SecAction "phase:4,log,auditlog,allow,id:500086"
|
||||
),
|
||||
match_log => {
|
||||
audit => [ qr/-A--.*-B--.*-C--.*-F--.*-E--.*-H--.*-K--.*-Z--/s, 1 ],
|
||||
|
@@ -40,7 +40,7 @@
|
||||
SecRuleEngine On
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 0
|
||||
SecRule REQUEST_URI "." "phase:1,deny"
|
||||
SecRule REQUEST_URI "." "phase:1,deny,id:500241"
|
||||
),
|
||||
match_log => {
|
||||
-debug => [ qr/./, 1 ],
|
||||
@@ -60,7 +60,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 1
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500242"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[[1]\] /, 1 ],
|
||||
@@ -85,7 +85,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 2
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500243"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[2\] /, 1 ],
|
||||
@@ -110,7 +110,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 3
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500244"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[3\] /, 1 ],
|
||||
@@ -135,7 +135,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 4
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500245"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[4\] /, 1 ],
|
||||
@@ -160,7 +160,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 5
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500246"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[5\] /, 1 ],
|
||||
@@ -185,7 +185,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 6
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500247"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[6\] /, 1 ],
|
||||
@@ -210,7 +210,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 7
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500248"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[7\] /, 1 ],
|
||||
@@ -235,7 +235,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 8
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500249"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[8\] /, 1 ],
|
||||
@@ -260,7 +260,7 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 9
|
||||
SecRuleScript "test.lua" "phase:1"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
|
||||
SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus,id:500250"
|
||||
),
|
||||
match_log => {
|
||||
debug => [ qr/\]\[9\] /, 1 ],
|
||||
|
@@ -13,7 +13,7 @@
|
||||
conf => qq(
|
||||
SecRuleEngine on
|
||||
SecDefaultAction "phase:1,deny,status:500"
|
||||
SecRule REQUEST_URI "test.txt"
|
||||
SecRule REQUEST_URI "test.txt,id:500240"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/ModSecurity: Access denied with code 500 \(phase 1\)/, 1 ],
|
||||
@@ -52,7 +52,7 @@
|
||||
conf => qq(
|
||||
SecRuleEngine On
|
||||
SecDataDir "$ENV{DATA_DIR}"
|
||||
SecAction initcol:ip=%{REMOTE_ADDR},setvar:ip.dummy=1,pass
|
||||
SecAction initcol:ip=%{REMOTE_ADDR},setvar:ip.dummy=1,pass,id:500085
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/ModSecurity: Warning. Unconditional match in SecAction\./, 1 ],
|
||||
|
@@ -7,8 +7,8 @@
|
||||
conf => q(
|
||||
SecRuleEngine On
|
||||
SecArgumentSeparator ";"
|
||||
SecRule ARGS:a "@streq 1" "phase:1,deny,chain"
|
||||
SecRule ARGS:b "@streq 2"
|
||||
SecRule ARGS:a "@streq 1" "phase:1,deny,chain,id:500215"
|
||||
SecRule ARGS:b "@streq 2,id:500216"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/Access denied with code 403 \(phase 1\)\. String match "2" at ARGS:b\./, 1 ],
|
||||
@@ -25,8 +25,8 @@
|
||||
comment => "SecArgumentSeparator (get-neg)",
|
||||
conf => q(
|
||||
SecRuleEngine On
|
||||
SecRule ARGS:a "@streq 1" "phase:1,deny,chain"
|
||||
SecRule ARGS:b "@streq 2"
|
||||
SecRule ARGS:a "@streq 1" "phase:1,deny,chain,id:500217"
|
||||
SecRule ARGS:b "@streq 2,id:500218"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
@@ -45,8 +45,8 @@
|
||||
SecRuleEngine On
|
||||
SecRequestBodyAccess On
|
||||
SecArgumentSeparator ";"
|
||||
SecRule ARGS:a "@streq 1" "phase:2,deny,chain"
|
||||
SecRule ARGS:b "@streq 2"
|
||||
SecRule ARGS:a "@streq 1" "phase:2,deny,chain,id:500219"
|
||||
SecRule ARGS:b "@streq 2,id:500220"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/Access denied with code 403 \(phase 2\)\. String match "2" at ARGS:b\./, 1 ],
|
||||
@@ -68,8 +68,8 @@
|
||||
conf => q(
|
||||
SecRuleEngine On
|
||||
SecRequestBodyAccess On
|
||||
SecRule ARGS:a "@streq 1" "phase:2,deny"
|
||||
SecRule ARGS:b "@streq 2" "phase:2,deny"
|
||||
SecRule ARGS:a "@streq 1" "phase:2,deny,id:500221"
|
||||
SecRule ARGS:b "@streq 2" "phase:2,deny,id:500222"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
@@ -93,8 +93,8 @@
|
||||
conf => qq(
|
||||
SecRuleEngine On
|
||||
SecRequestBodyAccess On
|
||||
SecRule ARGS:a "\@streq 1" "phase:2,deny,chain"
|
||||
SecRule ARGS:b "\@streq 2"
|
||||
SecRule ARGS:a "\@streq 1" "phase:2,deny,chain,id:500223"
|
||||
SecRule ARGS:b "\@streq 2,id:500224"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/Access denied with code 403 \(phase 2\)\. String match "2" at ARGS:b\./, 1 ],
|
||||
@@ -116,8 +116,8 @@
|
||||
conf => qq(
|
||||
SecRuleEngine On
|
||||
SecRequestBodyAccess Off
|
||||
SecRule ARGS:a "\@streq 1" "phase:2,deny"
|
||||
SecRule ARGS:b "\@streq 2" "phase:2,deny"
|
||||
SecRule ARGS:a "\@streq 1" "phase:2,deny,id:500225"
|
||||
SecRule ARGS:b "\@streq 2" "phase:2,deny,id:500226"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
@@ -269,8 +269,8 @@
|
||||
SecRequestBodyAccess On
|
||||
SecRequestBodyLimit 5
|
||||
|
||||
SecAction "phase:1,pass,nolog,ctl:ruleEngine=off"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny"
|
||||
SecAction "phase:1,pass,nolog,ctl:ruleEngine=off,id:500081"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny,id:500227"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Request body .*is larger than the configured limit/, 1 ],
|
||||
@@ -294,8 +294,8 @@
|
||||
SecRequestBodyAccess On
|
||||
SecRequestBodyLimit 5
|
||||
|
||||
SecAction "phase:1,pass,nolog,ctl:requestBodyAccess=off"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny"
|
||||
SecAction "phase:1,pass,nolog,ctl:requestBodyAccess=off,id:500082"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny,id:500228"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Request body .*is larger than the configured limit/, 1 ],
|
||||
@@ -319,8 +319,8 @@
|
||||
SecRequestBodyAccess On
|
||||
SecRequestBodyLimit 256
|
||||
|
||||
SecAction "phase:1,pass,nolog,ctl:ruleEngine=off"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny"
|
||||
SecAction "phase:1,pass,nolog,ctl:ruleEngine=off,id:500083"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny,id:500229"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Request body .*is larger than the configured limit/, 1 ],
|
||||
@@ -363,8 +363,8 @@
|
||||
SecRequestBodyAccess On
|
||||
SecRequestBodyLimit 256
|
||||
|
||||
SecAction "phase:1,pass,nolog,ctl:requestBodyAccess=off"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny"
|
||||
SecAction "phase:1,pass,nolog,ctl:requestBodyAccess=off,id:500084"
|
||||
SecRule REQUEST_BODY "." "phase:2,deny,id:500230"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Request body .*is larger than the configured limit \(256\)\./, 1 ],
|
||||
@@ -499,9 +499,9 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 5
|
||||
SecCookieFormat 1
|
||||
SecRule REQUEST_COOKIES_NAMES "\@streq SESSIONID" "phase:1,deny,chain"
|
||||
SecRule REQUEST_COOKIES:\$SESSIONID_PATH "\@streq /" "chain"
|
||||
SecRule REQUEST_COOKIES:SESSIONID "\@streq cookieval"
|
||||
SecRule REQUEST_COOKIES_NAMES "\@streq SESSIONID" "phase:1,deny,chain,id:500231"
|
||||
SecRule REQUEST_COOKIES:\$SESSIONID_PATH "\@streq /" "chain,id:500232"
|
||||
SecRule REQUEST_COOKIES:SESSIONID "\@streq cookieval,id:500233"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/Access denied with code 403 \(phase 1\)\. String match "cookieval" at REQUEST_COOKIES:SESSIONID\./, 1 ],
|
||||
@@ -526,9 +526,9 @@
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 5
|
||||
SecCookieFormat 0
|
||||
SecRule REQUEST_COOKIES_NAMES "\@streq SESSIONID" "phase:1,deny,chain"
|
||||
SecRule REQUEST_COOKIES:\$SESSIONID_PATH "\@streq /" "chain"
|
||||
SecRule REQUEST_COOKIES:SESSIONID "\@streq cookieval"
|
||||
SecRule REQUEST_COOKIES_NAMES "\@streq SESSIONID" "phase:1,deny,chain,id:500234"
|
||||
SecRule REQUEST_COOKIES:\$SESSIONID_PATH "\@streq /" "chain,id:500235"
|
||||
SecRule REQUEST_COOKIES:SESSIONID "\@streq cookieval,id:500236"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
|
@@ -10,7 +10,7 @@
|
||||
SecResponseBodyMimeTypesClear
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 9
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny"
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny,id:500237"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
@@ -34,7 +34,7 @@
|
||||
SecDebugLogLevel 9
|
||||
SecResponseBodyAccess On
|
||||
SecResponseBodyMimeType text/plain null
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny"
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny,id:500238"
|
||||
),
|
||||
match_log => {
|
||||
error => [ qr/Access denied with code 403 \(phase 4\)\. Pattern match "TEST" at RESPONSE_BODY\./, 1 ],
|
||||
@@ -55,7 +55,7 @@
|
||||
SecDebugLogLevel 9
|
||||
SecResponseBodyAccess Off
|
||||
SecResponseBodyMimeType text/plain null
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny"
|
||||
SecRule RESPONSE_BODY "TEST" "phase:4,deny,id:500239"
|
||||
),
|
||||
match_log => {
|
||||
-error => [ qr/Access denied/, 1 ],
|
||||
|
Reference in New Issue
Block a user