XMPP fails to handle server-to-server communication errors

RESOLVED FIXED in 1.6

Status

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: aleth, Assigned: aleth)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

5 years ago
For example, for a gmail.com contact (via syndication) with a ch3kr.net account:

onTransportStatus(STATUS_RECEIVING_FROM)
[18/10/2014 16:57:02] LOG   (@ prpl-jabber: XMPPParser.prototype._logReceivedData resource:///modules/xmpp-xml.jsm:320)
received:
<presence xmlns="jabber:client" type="error" to="c@ch3kr.net" from="n@gmail.com">
 <error xmlns="jabber:client" type="cancel">
  <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
   Server-to-server connection failed: Encrypted server-to-server communication is required but was not offered
  </text>
 </error>
</presence>

[18/10/2014 16:57:02] DEBUG (@ prpl-jabber: XMPPAccountPrototype.onPresenceStanza resource:///modules/xmpp.jsm:909)

Received presence stanza for n@gmail.com
[18/10/2014 16:57:10] LOG   (@ prpl-jabber: Socket.sendString resource:///modules/socket.jsm:255)
Sending:
<message to="n@gmail.com" type="chat" id="10"><body>testing</body></message>
[18/10/2014 16:57:10] DEBUG (@ prpl-jabber: Socket.onTransportStatus resource:///modules/socket.jsm:557)
onTransportStatus(STATUS_SENDING_TO)
[18/10/2014 16:57:12] DEBUG (@ prpl-jabber: Socket.onTransportStatus resource:///modules/socket.jsm:557)
onTransportStatus(STATUS_RECEIVING_FROM)
[18/10/2014 16:57:12] LOG   (@ prpl-jabber: XMPPParser.prototype._logReceivedData resource:///modules/xmpp-xml.jsm:320)
received:
<message xmlns="jabber:client" id="10" type="error" to="c@ch3kr.net/Instantbird" from="n@gmail.com">
 <error xmlns="jabber:client" type="cancel">
  <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
   Server-to-server connection failed: Encrypted server-to-server communication is required but was not offered
  </text>
 </error>
</message>

We can't do anything with such a contact, but the prpl will happily open conversations and appear to send messages without visible error messages.
(In reply to aleth [:aleth] from comment #0)

> the prpl will happily open conversations

This seems a reasonable behavior (as the s2s problem could be temporary).

> and appear to send messages without visible error messages.

Are we currently not handling <message type="error"> at all?
(Assignee)

Comment 2

5 years ago
(In reply to Florian Quèze [:florian] [:flo] from comment #1)
> (In reply to aleth [:aleth] from comment #0)
> 
> > the prpl will happily open conversations
> 
> This seems a reasonable behavior (as the s2s problem could be temporary).

A <presence type="error"> stanza should lead to the contact being status=unknown, so I disagree.
(Assignee)

Comment 3

5 years ago
Posted patch handleerrors.diff (obsolete) — Splinter Review
This improves things a bit.
Assignee: nobody → aleth
Status: NEW → ASSIGNED
Attachment #8507511 - Flags: review?(florian)
(Assignee)

Comment 4

5 years ago
Posted patch handleerrors.diff v2 (obsolete) — Splinter Review
This is a little less lazy.
Attachment #8507511 - Attachment is obsolete: true
Attachment #8507511 - Flags: review?(florian)
Attachment #8507524 - Flags: review?(florian)
(Assignee)

Comment 5

5 years ago
Posted patch handleerrors.diff v3 (obsolete) — Splinter Review
Avoid unrelated whitespace changes. Sorry for the bugspam
Attachment #8507524 - Attachment is obsolete: true
Attachment #8507524 - Flags: review?(florian)
Attachment #8507525 - Flags: review?(florian)
(Assignee)

Comment 6

5 years ago
Put back early return for errors to avoid typing notifications, as discussed on IRC.
Attachment #8507525 - Attachment is obsolete: true
Attachment #8507525 - Flags: review?(florian)
Attachment #8507792 - Flags: review?(florian)
(Assignee)

Updated

4 years ago
Attachment #8507792 - Flags: review?(florian) → review?(clokep)
Attachment #8507792 - Flags: review?(clokep) → review+
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in before you can comment on or make changes to this bug.