CWAF Request body no files data length is larger than the configured limit

sufiyanshaikh

Verified User
Joined
Aug 14, 2019
Messages
181
Hello,

After installing CWAF, one of my client is facing issue when submitting form.

Apache-Error: [file "apache2_util.c"] [line 271] [level 3] [client xxx.xx.xx.xxx] ModSecurity: Request body no files data length is larger than the configured limit (131072). [hostname "example.com"] [uri "/form_submit/"] [unique_id "gEkOhrpnaFpDeq7owABBQE"]


I tired https://forum.directadmin.com/threads/cwaf-data-length-error-while-posting-on-wordpress.61033/ but there was was not able to find SecRequestBodyNoFilesLimit in /etc/httpd/conf/extra/httpd-modsecurity.conf
Please help.

/etc/httpd/conf/extra/httpd-modsecurity.conf code

LoadFile /usr/local/lib/libxml2.so
<IfModule !mod_security2.c>
LoadModule security2_module /usr/lib/apache/mod_security2.so
</IfModule>

<IfModule mod_security2.c>
SecDefaultAction "phase:2,deny,log,status:406"
SecRequestBodyLimitAction ProcessPartial

<IfModule mod_ruid2.c>
SecAuditLogType Concurrent
SecAuditLogStorageDir /var/log/modsec_audit
</IfModule>

#SecServerSignature "Protected by COMODO WAF"

SecRuleEngine On
SecResponseBodyLimit 524288
SecAuditEngine RelevantOnly
SecAuditLog /var/log/httpd/modsec_audit.log
SecDebugLog /var/log/httpd/modsec_debug.log
SecAuditLogType Concurrent
SecDebugLogLevel 1
SecRequestBodyAccess On
SecDataDir /tmp
SecTmpDir /tmp
SecUploadDir /tmp
SecCollectionTimeout 600
SecPcreMatchLimit 250000
SecPcreMatchLimitRecursion 250000


# SecAuditLogType Concurrent
# SecAuditLogDirMode 1733
# SecAuditLogFileMode 0550
# SecAuditLogStorageDir /var/log/modsec_audit

Include /etc/modsecurity.d/*.conf.main
#IncludeOptional /etc/modsecurity.d/*.conf
 
Just seen the date on the original post. Pffff! maybe the link will help someone anyway. Who knows ;)
 
Back
Top