Archive

Posts Tagged ‘CIS’

WordPress and LimitRequestFieldSize

August 8th, 2009 No comments

I was recently troubleshooting a problem with WordPress and wanted to post the solution here for others to search on. If you’re experiencing the following symptoms:

  • Clicking “Status: Draft Edit” does nothing
  • Clicking “Visibility: Public Edit” moves the page down
  • Clicking “Publish immediately Edit” does nothing
  • You can’t add tags from the “Add New Post” screen

…the reason may be the Apache LimitRequestFieldSize directive. There are a few other similar symptoms, but they mostly boil down to, “I clicked something and nothing happened.”

Most posts I encountered said something along the lines of, “clear your cache, disable all your plugins and try again.” For some people this works, but it didn’t work for me.

I discovered that the problem was directly related to the value of the LimitRequestFieldSize directive. The default value of 8190 is probably OK for almost all situations, although there is a slight risk leaving the value that high. The CIS Apache Benchmark recommends a value of 100, which in my experience is not usable for most applications. I tried a value of 500, which didn’t make much of a difference. Inching the value up bit-by-bit eventually hit that magic number that made everything start working.

Depending on your environment and the size of the headers your browser is sending, you may need to adjust this value up or down, but try to stay on the conservative side to protect yourself from buffer overflows.

One final note, this is a server-wide directive and cannot be placed in a virtual host container.

Categories: Systems Hardening Tags: , ,