Packet with wrong date format makes Smack to disconnect
reported at: http://www.igniterealtime.org/community/thread/32742
affects Spark (and other Smack based clients): http://www.igniterealtime.org/community/thread/33364
tested with Openfire and gtalk (so it shouldnt be affected only by Openfire bug)
faulty packet example:
<message to="firstname.lastname@example.org/spark" type="chat" id="1345">
<x xmlns="jabber:x:delay" stamp="200868T09:16:20" from="email@example.com"/>
@Marcelo Maybe you should mention that you where making these changes in the openfire source code. This is tracked as and has been fixed in the trunk.
I had same problems. Working on it I found and fixed an error on:
ln 99: Matcher xep82WoMillisMatcher = xep80DateTimePattern.matcher(dateString);
ln 100: Matcher xep82Matcher = xep80DateTimeWoMillisPattern.matcher(dateString);
ln 99: Matcher xep82Matcher = xep80DateTimePattern.matcher(dateString);
ln100: Matcher xep82WoMillisMatcher = xep80DateTimeWoMillisPattern.matcher(dateString);
fixed in revision 11823
moved the XEP_0082_UTC_FORMAT DateFormat from the core class Packet to the StringUtils class (as suggested by Guus).
Added synchronized methods to access the formatter and replaced all usage of the formatter with this methods.
Your stream error problem and the fixes of my patch are not connected.
The patch fixes parsing a <message> or <presence> tag containing a <delay> tag with an errornous date.
Your problem seems to be that one of the entities you are communicating with sends an error in the XML stream.
(<stream> ... <message>...</message> ... <error>text</error> ... </stream>). So you should check why this error is sent.