Skip to content

Stop logging for particular REQBODY_ERROR_MSG #984

@mailtoyogeshpatel

Description

@mailtoyogeshpatel

We have a following rule
SecRule REQBODY_ERROR "!@eq 0"
"id:'200001', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2"

in modsecurity log file we are getting so many logs like following :
"
Message: Access denied with code 400 (phase 2). Match of "eq 0" against "REQBODY_ERROR" required. [file "D:/tools/Apache2.4.x/conf/extra/highq/modsec/modsecurity.conf"] [line "132"] [id "200001"] [msg "Failed to parse request body."] [data "Error reading request body: Client went away."] [severity "CRITICAL"]
"
i want to stop logging only if REQBODY_ERROR_MSG contains "Client went away." How to achieve this?

Metadata

Metadata

Assignees

Labels

2.xRelated to ModSecurity version 2.x

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions