mod_security not allow to upload files

Started by Insan3Us, September 15, 2024, 06:54:21 AM

Previous topic - Next topic

Insan3Us

Hi,
When I enable mod_security with Comodo WAF, when I try to upload files on my website I get this from website script:
https://ibb.co/ccFthQB
But my PHP upload limit is higher then the file that I want to upload...is like mod_Security ignore the php settings.

I don't get any errors in mod_security log... just this one:

ModSecurity: Access denied with code 403 (phase 1). Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "117"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "86.48.7.222"] [uri "/.env"] [unique_id "ZuXGOVr11PHxbzo61HtErgAAAIY"]

But I disabled the rules for id 210492...and now I don't get this error anymore, nothing in the logs...when I disable mod_security is working to upload files...
Someone know from where it is?

Thank you!

cyberspace

Make sure the rule is disabled, make a new attempt to upload the file and then check the error log file of the website:

/usr/local/apache/domlogs/domlogs/DOMAIN.COM.error_log

if the new attempt fails.

Insan3Us

Quote from: cyberspace on September 15, 2024, 11:36:41 AM
Make sure the rule is disabled, make a new attempt to upload the file and then check the error log file of the website:

/usr/local/apache/domlogs/domlogs/DOMAIN.COM.error_log

if the new attempt fails.

I solve it!
Was from 2 option settings, I had to add in mod_security.conf

Thank you!

overseer

It's always helpful to leave the actual, detailed solution in the thread for the sake of others searching for the same solution.

abud3d

Quote
I solve it!
Was from 2 option settings, I had to add in mod_security.conf
Thank you!

What is the solution followed? :( plz