Parsing of messages may disconnect Smack/Spark

Description

Use Spark, press F12 and send
<message to="sparkuser@jivesoftware.com" id="gS0vV-X"><body>diconnect test<item/><item/></body></message>
to a Spark user. He will be disconnected and may see this error in his log file:
org.xmlpull.v1.XmlPullParserException: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<body>diconnect test<item/>... @72:143)
at org.xmlpull.mxp1.MXParser.nextText(MXParser.java:1063)
at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:85)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:302)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:45)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:77)
05.03.2007 23:09:33 org.jivesoftware.spark.util.log.Log error

Environment

None

Activity

Show:

Henning Staib August 15, 2010 at 3:13 PM

fixed in revision 11824

LG March 9, 2007 at 5:41 AM

As discussed in http://www.igniterealtime.org/forum/thread.jspa?threadID=24992 it may also be a debug window issue - it seems that < and > are not properly escaped when using the ad-hoc message window.
So one can send valid XML but invalid XMPP data.
Receiving invalid data should anyhow not disconnect the receiving client.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 6, 2007 at 6:10 AM
Updated October 7, 2013 at 2:35 AM
Resolved November 23, 2010 at 1:15 AM