• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Allow specific Content types in Mod Security

tbachner

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
18.0.55 Update #2
When I activate ModSecurity I have a problem with content types:

[msg "COMODO WAF: Request content type is not allowed by policy. Please update file userdata_wl_content_type.||app.domain.de|F|2"] [data "TX:0=application/merge-patch+json"]

Where I find die file userdata_wl_content_type to add the content type application/merge-patch+json?
 
Ok. I found the file userdata_wl_content_type in the folder etc/apache2/modsecurity.d/rule/comodo_free. But I change this file, it always gets overwritten with default rules. How I can prevent this?
 
I've checked on a server here and it seems the files are not overwritten. Where did you see that they are?
 
I have the same problem - `/etc/apache2/modsecurity.d/rules/comodo_free/userdata_wl_content_type` is periodically reset to some factory default, neutering my changes.
 
Peter Debik, the file is overwritten every 24H by a process I cannot identify. This process should probably not be stoped anyway.

Plesk has a text box to "Input a ModSecurity directive" but it does not specify how we can write the directive.

Can someone help us, please?
 
The list with available directives for ModSecurity can be found on the ModSecurity documentation:
 
Thank you very much for your appreciated help Kaspar.

I already saw this reference manual, and I tried to add a directive in the "Custom directive" text box available in plesk/modsecurity/settings.

The directive I added is: "SecResponseBodyMimeType text/x-gwt-rpc".

I am not sure that this is the correct directive and format, but the 210710 modSecurity rule still bans client IP. The modsec_audit.log file still reports that the 210710 rule does not accept text/x-gwt-rpc content type.

I removed the directive as I am not sure that it was the right one.
 
Back
Top