Closed
Bug 1292884
Opened 8 years ago
Closed 8 years ago
Room discovery fails due to using the wrong service
Categories
(Chat Core :: XMPP, defect)
Chat Core
XMPP
Tracking
(Not tracked)
VERIFIED
FIXED
Instantbird 51
People
(Reporter: aleth, Assigned: abdelrahman)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
aleth
:
review+
|
Details | Diff | Splinter Review |
In response to disco#items, the server returns a list of services, for each of which we request disco#info.
E.g. on jabber.at this gives
<item xmlns="http://jabber.org/protocol/disco#items" jid="conference.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="echo.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="icq.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="irc.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="proxy.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="pubsub.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="upload.jabber.at"/>
<item xmlns="http://jabber.org/protocol/disco#items" jid="webpresence.jabber.at"/>
The problem is that the current code assumes that if the response for one of these contains a feature of namespace http://jabber.org/protocol/muc, that that service is the MUC room service. That assumption is wrong.
For example, the IRC transport has
<query xmlns="http://jabber.org/protocol/disco#info">
<identity xmlns="http://jabber.org/protocol/disco#info" category="conference" type="irc" name="IRC Transport"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/disco#info"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/muc"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="jabber:iq:register"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="vcard-temp"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/commands"/>
<x xmlns="jabber:x:data" type="result">
<field xmlns="jabber:x:data" var="FORM_TYPE" type="hidden">
<value xmlns="jabber:x:data">
http://jabber.org/network/serverinfo
</value>
</field>
</x>
</query>
or the ICQ gateway
<query xmlns="http://jabber.org/protocol/disco#info">
<identity xmlns="http://jabber.org/protocol/disco#info" category="gateway" name="ICQ Transport" type="icq"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="jabber:iq:register"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="jabber:iq:gateway"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="jabber:iq:private"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/disco#info"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/commands"/>
<feature xmlns="http://jabber.org/protocol/disco#info" var="http://jabber.org/protocol/muc"/>
</query>
The current code will use the last incoming disco#info response with a http://jabber.org/protocol/muc namespace to set _mucService. And so it will usually get it wrong.
Assignee | ||
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Comment on attachment 8779332 [details] [diff] [review]
v1 - set _mucService according to namespace, category and type
Review of attachment 8779332 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/xmpp/xmpp.jsm
@@ +1825,5 @@
> }
> let features = query.getElements(["feature"])
> .map(elt => elt.attributes["var"]);
> + let identity = query.getElement(["identity"]);
> + if (identity.attributes["category"] == "conference" &&
if (identity && ...
The node may not exist.
Attachment #8779332 -
Flags: review?(aleth) → review-
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8779332 -
Attachment is obsolete: true
Attachment #8779336 -
Flags: review?(aleth)
Reporter | ||
Comment 4•8 years ago
|
||
Comment on attachment 8779336 [details] [diff] [review]
v2 - set _mucService according to namespace, category and type
Review of attachment 8779336 [details] [diff] [review]:
-----------------------------------------------------------------
Who knows, maybe this will turn out to help clokep's strange gmail bug...
Attachment #8779336 -
Flags: review?(aleth) → review+
Assignee | ||
Comment 5•8 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 51
Reporter | ||
Updated•8 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•