Title: mod_security2 blocks saving posts
Last modified: June 4, 2023

---

# mod_security2 blocks saving posts

 *  [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * (@wp_kc)
 * [3 years ago](https://wordpress.org/support/topic/mod_security2-blocks-saving-posts/)
 * Do you guys ever test your software with mod_security2 enabled on Apache2? Because
   I’m seeing 403 errors when I try to save some pages. When I look at the log files,
   I see mod_security2 being triggered for XSS, RCE, and various other thing due
   to the content of the POST data. The POST data doesn’t look malicious (obviously),
   however it still triggers mod_security2.
 * Now, I can add commands for the web site config file like…
 *     ```wp-block-code
       <LocationMatch "^/wp-admin/admin-ajax.php">
          SecRuleRemoveById 932130
          SecRuleRemoveById 934100
          SecRuleRemoveById 941110
          SecRuleRemoveById 941160
          SecRuleRemoveById 941370
          SecRuleRemoveById 949110
          SecRuleRemoveById 980130
          SecRuleRemoveById 941100 
          SecRuleRemoveById 941160
       </LocationMatch>
       ```
   
 * But I’d rather not make my server less secure, and have you guys fix your posting
   technique. I would recommend that you bundle up all your POST data and encode
   it on the client side in a manner that mod_security2 can’t examine, and then 
   submit the data. Decode on the server side before using, of course.
 * Just about any encoding technique should work, base64, rot13, whatever.

The topic ‘mod_security2 blocks saving posts’ is closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [wp_kc](https://wordpress.org/support/users/wp_kc/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/mod_security2-blocks-saving-posts/)
 * Status: not resolved