Odd WordPress pingbacks

I’m getting some odd log messages for the apache module modsecurity.  Essentially its xml parser is breaking when random places are sending pingbacks. The requests go to xmlrpc.php and the response headers are ok, but the body is binary.  The message in the modsecurity log looks like:

Message: XML parser error: XML: Failed parsing document.

After a bit of guessing and sending messages to and fro, I can now see that it is a gziped response. So I’m not sure if it is modsecurity not realising that the response is gziped or wordpress not marking it correctly. In any case I can regularly get very similar binary strings using gzip and the usual xml response. So that’s half the mystery solved.

Most of the requests are spammers so I’m not too worried.  I think it also impacts legitimate pingbacks because I’ve not had any, even from the usual automatic places.

Getting around the WordPress "add image" bug

WordPress currently has an annoying bug where you cannot add images easily using the in-built editor. Instead of a pop-up being shown with the image setting details, you are sent to another page.  Once you choose the image size etc, you go to a blank page. Until that’s fixed, there is a work-around.  It’s not exactly pretty but it does work. I have assumed you have uploaded your images to the media library first.

First, type up what you want your blog entry to say. The save it as a draft which is the button in the blue circle in the screenshot. Then click the “add image” icon which will bring up the warning to go to the image selection page. This page should be a pop up on the same screen but is not (and is the bug).


On the image selection page choose “Image library” which is the blue circle and edit the meta-data such as the name caption etc. Once you are happy with your decisions, click the “Insert into Post” button (red circle) which goes to a blank screen.

The blank screen actually does have data in it. You will need to view source which will show something like:


The stuff in the win.send_to_editor is what you want. You will also need to change the backslash-quotes to plain quotes, so the code I would use is


You then enter this information back into your post (click back a few times in your browser). Also, make sure you have your editor set for HTML and not Visual for it to work. With that small bit of HTML, I have a nice set of home-grown tomatoes, or whatever else you want.

Enhanced by Zemanta