A user reported receiving the same set of messages each time he logged in, from any location using any client. An inspection of the database revealed that the user had a number of offline messages:
USERNAME MESSAGEID CREATIONDATE MESSAGESIZE
victim 14 001132598353468 154
victim 15 001132598355612 210
victim 16 001132598363511 154
victim 17 001132598366823 210
victim 18 001132598391895 215
victim 259 001135896275838 212
victim 352 001136999530924 265
victim 353 001136999532242 277
victim 354 001137002635071 183
victim 501 001138894710720 463
The datestamp at time of writing is 1138901301, so the first message is 73 days old; the user has been active in this time. I had the user log out and back in and this appeared in the error log (I can paste in full stacktrace if anyone would like it):
org.dom4j.DocumentException: Error on line 1 of document : An invalid XML character (Unicode: 0x19) was found in the value of attribute “from” and element is “message”. Nested exception: An invalid XML character (Unicode: 0x19) was found in the value of attribute “from” and element is “message”.
I inspected the contents of the user’'s offline messages and one record had an unusual character:
The unusual character (in the place of the apostrophe) appears to have ASCII code 0x19. The offending record was stored in the database right after the messages the user was complaining of receiving upon each login.
After altering the data in the row to replace the unusual character with another character, the user received all the offline messages once upon login, and the items were removed from the database.
A more favorable behaviour would be to reject these messages with unusual characters before storing them in the offline table. Would this be something resolved in newer versions of the software? We are currently using Jive Messenger 2.3.0.