Forum Moderators: phranque
My hosting company has just installed modSecurity on its servers. Now, I can't publish php examples any more through my CMS.
Is there a bias to avoid this through .htaccess? Hmmm... Guess no, right?
Heard about a "modsecurity_localrules.conf", which makes it possible to create exceptions:
<LocationMatch "/index.php/admin/upload/.*">
SecRuleRemoveById 960912
SecRuleRemoveById 960913
...
</LocationMatch>
But disabling a rule may be hazardous... Or it has to be .htaccess-protected against any threat (MySQL injection, PHP injection, encoding hack, etc.). More than this, one has to have the list of the rules ids.
Right?
Marino
My web hosting company made it possible for me to publish a "modsecurity_localrules.conf" file. The LocationMatch directive request a regexp. The id of the rule is given within the "error_log" file.
If you have to disable a rule, you also have to re-implement it on your own. For instance, I had to disable a rule that was blocking a form. I had to forbid some character not to create a vulnerability when submitting the form.