mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adjust parser activation rules in modsecurity.conf-recommended
This commit is contained in:
@@ -394,7 +394,7 @@
|
||||
SecXmlExternalEntity On
|
||||
SecDebugLog $ENV{DEBUG_LOG}
|
||||
SecDebugLogLevel 9
|
||||
SecRule REQUEST_HEADERS:Content-Type "^text/xml\$" "id:500029, \\
|
||||
SecRule REQUEST_HEADERS:Content-Type "^(?:application(?:/soap\+|/)|text/)xml" "id:500029, \\
|
||||
phase:1,t:none,t:lowercase,nolog,pass,ctl:requestBodyProcessor=XML"
|
||||
SecRule REQBODY_PROCESSOR "!^XML\$" nolog,pass,skipAfter:12345,id:500030
|
||||
SecRule XML "\@validateDTD $ENV{CONF_DIR}/SoapEnvelope-bad.dtd" "id:500031 \\
|
||||
|
@@ -236,7 +236,7 @@
|
||||
SecAuditLog "$ENV{AUDIT_LOG}"
|
||||
SecDebugLogLevel 9
|
||||
SecRequestBodyJsonDepthLimit 3
|
||||
SecRule REQUEST_HEADERS:Content-Type "application/json" \\
|
||||
SecRule REQUEST_HEADERS:Content-Type "^application/json" \\
|
||||
"id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
|
||||
SecRule REQBODY_ERROR "!\@eq 0" "id:'200444',phase:2,log,deny,status:403,msg:'Failed to parse request body'"
|
||||
SecRule ARGS "\@streq 25" "id:'200445',phase:2,log,deny,status:403"
|
||||
|
Reference in New Issue
Block a user