|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59972 Binary bodies are not captured properly
Submitted: 2011-09-27 16:02 UTC Modified: 2011-09-27 16:05 UTC
From: jthijssen at noxlogic dot nl Assigned:
Status: Closed Package: stomp (PECL)
PHP Version: Trunk SVN-2011-09-27 (dev) OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jthijssen at noxlogic dot nl
New email:
PHP Version: OS:


 [2011-09-27 16:02 UTC] jthijssen at noxlogic dot nl
When reading a stomp message, it doesn't respect the content-length header. It will read until the first \0 byte. This is because of a small bug when adding keys/values to the message-hash.

This results in stomp.c (around line 515) not be able to find the content-length header back, and thus it will read the data until the first \0 byte.

Reproduce code:
Any message with a \0 inside the message body. 


stomp.patch (last revision 2011-10-12 12:50 UTC by jthijssen at noxlogic dot nl)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-27 16:05 UTC] jthijssen at noxlogic dot nl
Looks like i cannot add patches, so I'll include a gist to the patch:
 [2012-11-18 22:05 UTC]
-Status: Open +Status: Closed
 [2012-11-18 22:05 UTC]
Automatic comment on behalf of pierrick
Log: Fixed bug #59972 - Make body binary safe
 [2013-04-11 20:01 UTC] mi+php at aldan dot algebra dot com
In case of ActiveMQ the unconditional adding of Content-Length header has one undesired effect -- the web-GUI no longer treats message-bodies as displayable:

To work around this, users of ActiveMQ may want to add 'amq-msg-type' => 'text' to the headers.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 02:01:30 2024 UTC