Disco IQ Stanza lack a from attribute when using a ComponentXMPP
I'm currently trying to make XEP 0172 User Nick working with a ComponentXMPP, and it seems that the capabilities discovery stanzas sent by slixmpp result in stram error for improper-addressing
.
My component is pretty barebone right now, the most notable addition being
self.auto_subscribe = True
self.auto_authorize = True
In the log below, the component is transmittr.kerpylati.space.
DEBUG Using selector: EpollSelector
DEBUG Loaded Plugin: XEP-0030: Service Discovery
DEBUG Loaded Plugin: XEP-0004: Data Forms
DEBUG Loaded Plugin: XEP-0131: Stanza Headers and Internet Metadata
DEBUG Loaded Plugin: XEP-0082: XMPP Date and Time Profiles
DEBUG Loaded Plugin: XEP-0060: Publish-Subscribe
DEBUG Loaded Plugin: XEP-0128: Service Discovery Extensions
DEBUG Loaded Plugin: XEP-0115: Entity Capabilities
DEBUG Loaded Plugin: XEP-0163: Personal Eventing Protocol (PEP)
DEBUG Loaded Plugin: XEP-0172: User Nickname
DEBUG Loaded Plugin: XEP-0199: XMPP Ping
DEBUG Connecting to 127.0.0.1:5347
DEBUG Event triggered: connecting
DEBUG DNS: Querying for AAAA records.
DEBUG DNS: Exception while querying for AAAA records: (1, 'DNS server returned answer with no data')
DEBUG DNS: Querying for A records.
DEBUG DNS: Exception while querying for A records: (1, 'DNS server returned answer with no data')
DEBUG Event triggered: connected
DEBUG SEND: <stream:stream xmlns="jabber:component:accept" xmlns:stream="http://etherx.jabber.org/streams" to="transmittr.kerpylati.space">
DEBUG RECV: <stream:stream id="3348869947379673760" xml:lang="en" from="transmittr.kerpylati.space">
DEBUG SEND: <handshake xmlns="jabber:component:accept">6fb20fcbbb66d1fb6070cdb91626b9d20bfc4f55</handshake>
DEBUG RECV: <handshake />
DEBUG Event triggered: session_bind
DEBUG Event triggered: session_start
DEBUG Looking up local disco#info data for None, node None.
DEBUG No identity found for this entity. Using default component identity.
DEBUG RECV: <presence xml:lang="en" to="plop@transmittr.kerpylati.space" from="test@kerpylati.space/Conversations._lbQ" type="unavailable" />
DEBUG Event triggered: presence
DEBUG Event triggered: presence_unavailable
DEBUG RECV: <iq xml:lang="en" to="transmittr.kerpylati.space" from="test@kerpylati.space/Conversations._lbQ" type="get" id="DKMaCcBhCooq"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
DEBUG Received disco info query from <test@kerpylati.space/Conversations._lbQ> to <transmittr.kerpylati.space>.
DEBUG SEND: <iq xml:lang="en" to="test@kerpylati.space/Conversations._lbQ" from="transmittr.kerpylati.space" type="result" id="DKMaCcBhCooq"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="component" type="generic" /><feature var="http://jabber.org/protocol/disco#info" /><feature var="jabber:x:data" /><feature var="http://jabber.org/protocol/shim" /><feature var="http://jabber.org/protocol/shim#SubID" /><feature var="http://jabber.org/protocol/caps" /><feature var="http://jabber.org/protocol/nick+notify" /><feature var="http://jabber.org/protocol/nick" /><feature var="urn:xmpp:ping" /></query></iq>
DEBUG RECV: <presence xml:lang="en" to="plop@transmittr.kerpylati.space" from="test@kerpylati.space/Conversations._lbQ"><c xmlns="http://jabber.org/protocol/caps" ver="zcIke+Rk13ah4d1pwDG7bEZsVwA=" node="http://conversations.im" hash="sha-1" /><x xmlns="vcard-temp:x:update"><photo>e5c415e9064c0f59565625a3f1c5592ffb870216</photo></x></presence>
DEBUG Event triggered: presence
DEBUG Event triggered: presence_available
DEBUG Event triggered: got_online
DEBUG Event triggered: changed_status
DEBUG Event triggered: entity_caps
DEBUG New caps verification string: zcIke+Rk13ah4d1pwDG7bEZsVwA=
DEBUG SEND: <iq id="1b7cc1f0-a6fc-4b75-8b60-d4f52d52c9e6-1" to="test@kerpylati.space/Conversations._lbQ" type="get"><query xmlns="http://jabber.org/protocol/disco#info" node="http://conversations.im#zcIke+Rk13ah4d1pwDG7bEZsVwA=" /></iq>
DEBUG RECV: <stream:error xmlns="http://etherx.jabber.org/streams"><improper-addressing xmlns="urn:ietf:params:xml:ns:xmpp-streams" /><text xmlns="urn:ietf:params:xml:ns:xmpp-streams" xml:lang="en">Missing 'from' attribute</text></stream:error>
DEBUG Event triggered: stream_error
DEBUG End of stream received
DEBUG Event triggered: killed
INFO connection_lost: (None,)
DEBUG Event triggered: disconnected
DEBUG Tried to cancel unscheduled event: Disconnect wait
DEBUG Event triggered: session_end
DEBUG Scheduled event: IqTimeout_1b7cc1f0-a6fc-4b75-8b60-d4f52d52c9e6-1
DEBUG Could not retrieve disco#info results for caps for http://conversations.im#zcIke+Rk13ah4d1pwDG7bEZsVwA=
I tried hard-coding an iFrom
in the call to get_info()
in _process_caps()
in xep_0115/caps.py, and this time the session processed without any issue.
From what I understand, I feel that all plugins that call register_pep
could possibly trigger this issue.
That said, I might also have missed something obvious.