happy9335 / jaxl

Automatically exported from code.google.com/p/jaxl
GNU General Public License v3.0
0 stars 0 forks source link

Function unwrapBody in jaxl.0124.php doesn't handle carriage returns \r or \n #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I tried to receive messages - and it is not work when message contains \r or \n 
(this body with carriage returns, I don't known if it possible to post here \r 
\n):

<body xmlns='http://jabber.org/protocol/httpbind'><message 
xmlns='jabber:client' from='desktopclient@localhost' to='jaxclient@localhost' 
type='chat' id='ab5ca'>
<body>Hello, world</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message></body>

Error in function unwrapBody in jaxl.0124.php.
I "fixed" it by adding:
$payload = preg_replace("/\r?\n/", "", $payload);
to the first line of function, but it is also replaces and \r \n in body of 
message.

Original issue reported on code.google.com by alexeyfr...@gmail.com on 27 Jan 2011 at 1:52

GoogleCodeExporter commented 8 years ago
Hi Alex,

What version of Jaxl library are you currently using. I remember checking in 
code a while back to fix such issues. Can you kindly try out the latest code 
from here https://github.com/abhinavsingh/JAXL/archives/master. 

Original comment by mailsfor...@gmail.com on 28 Jan 2011 at 11:57

GoogleCodeExporter commented 8 years ago
Yes. My version was last but from google code. Version from github doesn't have 
this defect. Thanks.

Original comment by alexeyfr...@gmail.com on 28 Jan 2011 at 1:28

GoogleCodeExporter commented 8 years ago

Original comment by mailsfor...@gmail.com on 28 Jan 2011 at 2:27