mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds support 'xmlns' action to the libmodsec parser
This commit is contained in:
38
test/test-cases/regression/action-xmlns.json
Normal file
38
test/test-cases/regression/action-xmlns.json
Normal file
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"title":"Testing action :: XMLNS (parser error 1)",
|
||||
"expected":{
|
||||
"parser_error": "XMLS: Bad format, missing equals sign"
|
||||
},
|
||||
"rules":[
|
||||
"SecRule REQUEST_HEADERS:Content-Type \"^text/xml$\" \"id:500008,phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML\"",
|
||||
"SecRule REQUEST_HEADERS:User-Agent \"^(.*)$\" \"id:123,xmlns:soap'http://schemas.xmlsoap.org/soap/envelope/'\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"title":"Testing action :: XMLNS (parser error 2)",
|
||||
"expected":{
|
||||
"parser_error": "XMLS: XMLNS is invalid. Expecting a name=value format."
|
||||
},
|
||||
"rules":[
|
||||
"SecRule REQUEST_HEADERS:Content-Type \"^text/xml$\" \"id:500008,phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML\"",
|
||||
"SecRule REQUEST_HEADERS:User-Agent \"^(.*)$\" \"id:123,xmlns:=\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"title":"Testing action :: XMLNS (parser error 3)",
|
||||
"expected":{
|
||||
"parser_error": "XMLS: Missing xmlns href for prefix: `schemas.xmlsoap.org/soap/envelope/'."
|
||||
},
|
||||
"rules":[
|
||||
"SecRule REQUEST_HEADERS:Content-Type \"^text/xml$\" \"id:500008,phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML\"",
|
||||
"SecRule REQUEST_HEADERS:User-Agent \"^(.*)$\" \"id:123,xmlns:soap='schemas.xmlsoap.org/soap/envelope/'\""
|
||||
]
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user