Empty $_POST data

Posted by Antimony on Server Fault See other posts from Server Fault or by Antimony
Published on 2012-12-09T07:41:13Z Indexed on 2012/12/09 17:06 UTC
Read the original article Hit count: 312

Filed under:
|

I am trying to post a post to my MyBB server from a Python script, but try as I might, I can't get it to work. The request shows up in the forensic log and the headers are in the $_SERVER variable, but $_POST is always an empty array. The error log shows nothing, even at the debug level. I've already tried searching, but I haven't found anything that's helped. I already checked the post_max_size thing, which is 8M.

Another factor is that it's just my own requests which aren't going through. Browser generated requests seem to do just fine. I've looked and looked, but I can't find anything I'm doing differently that should matter.

Anyway, here is an example request.

POST /newreply.php?tid=1&processed=1 HTTP/1.1
Host: <redacted>
Accept-Encoding: identity
Content-Length: 1153
Content-Type: multipart/form-data; boundary=-->0xa216654L
Cookie: sid=<redacted>; mybb[lastvisit]=1354995469; mybb[lastactive]=1354995500; mybb[threadread]=a%3A1%3A%7Bi%3A1%3Bi%3A1354995469%3B%7D; mybb[forumread]=a%3A1%3A%7Bi%3A2%3Bi%3A1354995469%3B%7D; loginattempts=1; mybbuser=2_ZlVVfaYS9FstZGQzr4KiNRUm3Z4xAgJkTPPq2ouFcuaragOTVQ
Accept: text/html
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1

-->0xa216654L
Content-Disposition: form-data; name="my_post_key"

257b2bbef4334000d9088169154900a3
-->0xa216654L
Content-Disposition: form-data; name="quoted_ids"


-->0xa216654L
Content-Disposition: form-data; name="tid"

1
-->0xa216654L
Content-Disposition: form-data; name="message"

foo!2
-->0xa216654L
Content-Disposition: form-data; name="attachmentact"


-->0xa216654L
Content-Disposition: form-data; name="attachmentaid"


-->0xa216654L
Content-Disposition: form-data; name="icon"

-1
-->0xa216654L
Content-Disposition: form-data; name="posthash"

e93a2c78ce3f6807a86fd475ef4178cf
-->0xa216654L
Content-Disposition: form-data; name="postoptions[subscriptionmethod]"


-->0xa216654L
Content-Disposition: form-data; name="replyto"


-->0xa216654L
Content-Disposition: form-data; name="message_new"

foo!2
-->0xa216654L
Content-Disposition: form-data; name="submit"

Post Reply
-->0xa216654L
Content-Disposition: form-data; name="attachment"; filename=""
Content-Type: application/octet-stream


-->0xa216654L
Content-Disposition: form-data; name="action"

do_newreply
-->0xa216654L
Content-Disposition: form-data; name="subject"

Lol
-->0xa216654L

© Server Fault or respective owner

Related posts about apache2

Related posts about php