Projects tigase _server server-core Issues #1282
XMPPProcessorAbstract.processToUserPacket() responds to IQ result with error (#1282)
Closed
wojciech.kapcia@tigase.net opened 3 years ago
[2021-09-07 14:36:05.666] [TRACE] [      in_12-sess-man] t.x.XMPPProcessor.canHandle()   : UrnXmppPing (urn:xmpp:ping), authorization/canHandle: AUTHORIZED, Request: from=s2s@ip-172-31-43-31.us-west-2.compute.internal, to=sess-man@ip-172-31-43-31.us-west-2.compute.internal, DATA=<iq from="…@movim.eu/movimrsH4d3" type="result" xmlns="jabber:client" xml:lang="en" to="…@tigase.org" id="c5e217b2-07fb-4bab-87fb-2b7cb679c1b9"><ping xmlns="urn:xmpp:ping"/></iq>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=result, STABLE_ID=8a51fe79-dbbe-4fdb-bcaa-6cdeb41397ec, conn: XMPPResourceConnection=[user_jid=…@tigase.org/10248535-tigase-390, packets=968754, connectioId=c2s@ip-172-31-43-31.us-west-2.compute.internal/172.19.0.3_5222_172.31.39.18_24020, domain=tigase.org, authState=AUTHORIZED, isAnon=false, isTmp=false, parentSession hash=786238219, parentSession liveTime=7871918]
[2021-09-07 14:36:05.666] [TRACE] [      in_12-sess-man] t.s.x.SessionManager.walk()     : XMPPProcessorIfc: UrnXmppPing (urn:xmpp:ping)Request: from=s2s@ip-172-31-43-31.us-west-2.compute.internal, to=sess-man@ip-172-31-43-31.us-west-2.compute.internal, DATA=<iq from="…@movim.eu/movimrsH4d3" type="result" xmlns="jabber:client" xml:lang="en" to="…@tigase.org" id="c5e217b2-07fb-4bab-87fb-2b7cb679c1b9"><ping xmlns="urn:xmpp:ping"/></iq>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=result, STABLE_ID=8a51fe79-dbbe-4fdb-bcaa-6cdeb41397ec, conn: XMPPResourceConnection=[user_jid=…@tigase.org/10248535-tigase-390, packets=968754, connectioId=c2s@ip-172-31-43-31.us-west-2.compute.internal/172.19.0.3_5222_172.31.39.18_24020, domain=tigase.org, authState=AUTHORIZED, isAnon=false, isTmp=false, parentSession hash=786238219, parentSession liveTime=7871918]
…
[2021-09-07 14:36:05.666] [TRACE] [urn:xmpp:ping-proc-0] t.x.XMPPProcessorAbstract.process(): Calling method: processToUserPacket, for packet=from=s2s@ip-172-31-43-31.us-west-2.compute.internal, to=sess-man@ip-172-31-43-31.us-west-2.compute.internal, DATA=<iq from="…@movim.eu/movimrsH4d3" type="result" xmlns="jabber:client" xml:lang="en" to="…@tigase.org" id="c5e217b2-07fb-4bab-87fb-2b7cb679c1b9"><ping xmlns="urn:xmpp:ping"/></iq>, SIZE=189, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=result, STABLE_ID=8a51fe79-dbbe-4fdb-bcaa-6cdeb41397ec, for session=XMPPResourceConnection=[user_jid=…@tigase.org/10248535-tigase-390, packets=968754, connectioId=c2s@ip-172-31-43-31.us-west-2.compute.internal/172.19.0.3_5222_172.31.39.18_24020, domain=tigase.org, authState=AUTHORIZED, isAnon=false, isTmp=false, parentSession hash=786238219, parentSession liveTime=7871918
…
[2021-09-07 14:36:05.667] [TRACE] [urn:xmpp:ping-proc-0] t.x.i.JabberIqPrivacy.filter()  : Checking outbound packet: from=null, to=null, DATA=<iq from="wojtek@tigase.org" to="edhelas@movim.eu/movimrsH4d3" type="error" id="c5e217b2-07fb-4bab-87fb-2b7cb679c1b9" xmlns="jabber:client"><ping xmlns="urn:xmpp:ping"/><error type="wait" code="404"><recipient-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">The recipient is no longer available.</text></error></iq>, SIZE=388, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=error, STABLE_ID=null

Specification of 8.2.3. IQ Semantics states:

An entity that receives a stanza of type "result" or "error" MUST NOT respond to the stanza by sending a further IQ response of type "result" or "error"; however, the requesting entity MAY send another request (e.g., an IQ of type "set" to provide obligatory information discovered through a get/result pair).

wojciech.kapcia@tigase.net commented 3 years ago

Created test and fixed the issue.

Andrzej Wójcik (Tigase) commented 3 years ago

This fix forces Tigase XMPP Server to drop all <iq/> of type error or result sent to the user - breaks ie. disco#info, disco#items.

wojciech.kapcia@tigase.net commented 3 years ago

My bad, fixed.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Spent time
4h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1282
Please wait...
Page is in error, reload to recover