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:
@@ -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 ],
|
||||
|
Reference in New Issue
Block a user