StompDecoder fails for partial headers containing escape sequence [SPR-13416] #17995
Labels
in: messaging
Issues in messaging modules (jms, messaging)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Michael Kötter opened SPR-13416 and commented
We encountered frequent disconnects in our STOMP-Websocket application and traced the issue to the following exceptions occuring in StompDecoder:
StompDecoder seems to decode the message in chunks, which is fine as long as the chunk doesn't end right after the start of an escape sequence in the header (as is the case with the above exceptions).
This is related to #17025, which doesn't really fix the root cause - the message header is not necessarily invalid because it ends with "", it's just incomplete, and the next chunk would probably contain the remaining bits.
Attached is a patch with proposed fix (only parses headers after an EOL was encountered) and test case to reproduce the issue.
Affects: 4.1.7, 4.2 GA
Attachments:
Issue Links:
Referenced from: commits 4428c34, daa49c9
Backported to: 4.1.8
The text was updated successfully, but these errors were encountered: