curl & wget in WordPress posts

Blogging, Wordpress

My last post posed some problems. When attempting to save I received the 403 forbidden error seen here. I found that the reason for this was due to mod_security getting uppity over the word wget in my code examples. You will get the same issue if you ever use the word curl (even in a normal sentence like “curl up”).

If you run into this issue you have 2 choices.

  1. Change mod_security
  2. Use a simple workaround

I opt for #2. Changing mod_security is complex and the inability to use these words is there for a reason. They are commands that can cause some serious havoc to your server if abused. So, instead of gimping your security simply do the following:

use   (non-breaking space HTML element)

To use these words in this post I did the following:

Title: curl & wget in WordPress posts
In a sentence: “…the word wget in my code examples…”

Just make sure you never have the problem word, then a normal space, then any text. It will cause the 403 error.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Yahoo! Bookmarks
  • email

One Comment

  1. Heh. I can only imagine how long it took to debug that one.
    Doesn’t look like the error message was very helpful.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>