WordPress / Web Server Glitch
Posted by James on September 24th, 2007This is all so very strange, but it happened to me, so for anyone who has had been unable to post while posting to WordPress, read up…
I had an entry that I wrote in Japan in 2002. The post contains the word “selection”. Many, many paragraphs later, the word “from” is also present. Apparently, the way my web host was setup, having these two words in the same document, or post, might be misinterpreted as something of a security breach. At first I thought WordPress might have a maximum character limit to posts. But after breaking down my old post, paragraph by paragraph, it turns out that a word (or rather two words in the right order) caused the glitch…
ModSecurity for Apache checks posts for, among other things, SQL injection.
In my case, having the word “selection” in a post, followed much later by the word “from”, must have looked like SQL to mod_security. I got the “Forbidden” error for posts.php.
Apparently, my server’s installation of mod_security was compiled with the -DDISABLE_HTACCESS_CONFIG switch, so I could disable the checking of posts in a .htaccess file in the wp-admin directory with:
SecFilterScanPOST Off
If you’re an ‘advanced’ user, do the following if you don’t have an .htaccess file in your /wp-admin/ directory:
- Make a new, plain-text document (with Notepad - NOT with Word or any other word processor) called “.htaccess” (no file extensions or anything) if you don’t already have one in the /wp-admin/ diretory.
- In the file, be sure to enter the line “SecFilterScanPOST Off”. Save it.
- Upload the file to your WordPress blog’s “/wp-admin/” directory.
You can now post something like “selection from” without getting the boot from your web server and WordPress.
NOTE: Apparently, having the two words in the Post Title will form a “Forbidden” error as well, so if you do, change the “Post Slug” so that it doesn’t have those words in it. Will they fix this glitch in Version 2.3?













Recent Comments