-
I concur. The check was intended only for message stanzas (as it dealt with that particular stanza). Other stanzas are processed in other parts of the system and have different semantics. AFAIR all message stanzas must possess
toattribute and only IQ and Presence can do without (with the notion, they should be processed by the server on client behalf)I added check for if the packet is a Message and NPE protection.
-
@wojtek I'm not sure, but I think it may be allowed for message to be sent by the server to the client with empty
fromattribute if it is generated by the server (ie. Message Carbons). In response to this message, client could send<message/>withtypeset toerror, but it would gettoset tonullin this case.
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Version |
tigase-server-8.4.0
|
Iterations
-
tigase-server-8.4.0 Closed
Issue Votes (0)
There is an NPE being thrown in the
MessageDelieveryLogicclass:In this code, there is an assumption, according to comments, that it works on/tests messages, while
preProcess()method inXMPPPreprocessorIfcis called without any checks nor filtering, which means that any type of packet (iq/message/presence) may be tested with those rules.Another issue is that this code assumes that
tofor the stanza is set. According to RFC, if there is noto, then the stanza should be processed locally by the server and I think in this case, server sent to the client (from the domain bare jid) some iq request and client in response removedtoas it was not needed (according to the client). Then foriqthis packet should not be blocked.I think we need to add
NPEprotection, and make sure that this check is done only formessagestanzas.