Cannot attach files in Horde : ModSecurity: Access denied with code 44

Created:

2016-11-16 13:25:41 UTC

Modified:

2017-08-16 16:09:16 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Cannot attach files in Horde : ModSecurity: Access denied with code 44

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Cannot attach files in Horde, it is hanged in uploading state, the following error can be found in web server error log /var/log/httpd/error_log :

ModSecurity: Access denied with code 44 (phase 2). Match of "eq 0" against "MULTIPART_UNMATCHED_BOUNDARY" required. [file "/etc/httpd/conf.d/mod_security.conf"] [line "97"] [id "200003"] [msg "Multipart parser detected a possible unmatched boundary"] [hostname "webmail.puigfito.com"] [uri "/services/ajax.php/imp/addAttachment"] [unique_id "VqnL5FLCW54AAFFr8S8AAAAH"]
Invalid response status 44, referer: http://webmail.domain.tld/imp/dynamic.php?page=compose&type=new&token=ezPXeLIHVHukU0e-0C0PU7o&uniq=1453968345263

Cause

The root cause of the issue is that ModSecurity package installed from 3rd-party repository.

Resolution

  1. Check ModSecurity package:

    # rpm -qa | grep mod_security
    mod_security-2.7.4-1
  2. Check vendor of this package:

    # rpm -qi mod_security-2.7.4-1
    Name : mod_security Relocations: (not relocatable)
    Version : 2.7.4 Vendor: PowerStack
    Release : 1 Build Date: lun 10 jun 2013 23:02:52 CEST
    Install Date: miИ 10 jul 2013 13:56:21 CEST Build Host: centos-5-amd64

Modsecurity packages provided by Plesk looks like the following packages, e.g.:

    mod_security-2.8.0-14061715.x86_64.rpm   
plesk-modsecurity-configurator-12.0.18-cos5.build1200150814.14.noarch.rpm
plesk-modsecurity-crs-12.0.14-14033113.x86_64.rpm
  1. As a workaround comment security rule which causes the issue in '/etc/httpd/conf.d/mod_security.conf':

    # grep 'MULTIPART_UNMATCHED_BOUNDARY' /etc/httpd/conf.d/mod_security.conf
    #SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" "id:'200003', phase:2, t:none, log, deny, status:44, msg:'Multipart parser detected a possible unmatched boundary'"
  2. Restart apache service:

    # service httpd restart

Please note that it is recommended to use ModSecurity packages provided by Plesk to avoid any malfunctioning. Install ModSecurity using Plesk autoinstaller, refer section 3 in KB #213941365 .

Have more questions? Submit a request
Please sign in to leave a comment.