As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 795078 - Thunderbird does not see user online and can't receive message from a contact with a singe quote in its resource
: Thunderbird does not see user online and can't receive message from a contact...
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: 16 Branch
: All All
: -- normal (vote)
: Thunderbird 18.0
Assigned To: Florian Quèze [:florian] [:flo]
Depends on:
  Show dependency treegraph
Reported: 2012-09-27 12:56 PDT by Arnaud Abélard
Modified: 2012-10-05 11:20 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch (770 bytes, patch)
2012-10-01 06:14 PDT, Florian Quèze [:florian] [:flo]
clokep: review+
standard8: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description User image Arnaud Abélard 2012-09-27 12:56:38 PDT
If a remote contact has a single quote (') in their XMPP resource, Thunderbird's Instant Messaging client will never see it online. If the contact messages the user using Thunderbird, no message will be received.

If the remote user removes the single quote from its resource, it will show as online in Thunderbird's contact list as expected and Thunderbird will receive messages from the remote user.
Comment 1 User image Florian Quèze [:florian] [:flo] 2012-10-01 03:33:22 PDT
Thanks for reporting this.

When Thunderbird receives a presence stanza with a single quote in the resource, this error appears in the Error Console:
Error: TypeError: this._account._parseJID(...) is null
Comment 2 User image Florian Quèze [:florian] [:flo] 2012-10-01 06:14:48 PDT
Created attachment 666518 [details] [diff] [review]

The XMPP rfc says that the following characters are excluded for the "node" part of the JID:
    #x22 (")
    #x26 (&)
    #x27 (')
    #x2F (/)
    #x3A (:)
    #x3C (<)
    #x3E (>)
    #x40 (@)

But doesn't list any prohibited ASCII character for the resource part ( so I think we shouldn't exclude any character there.

For the domain part, it just says it should be a valid domain name. The only characters that we really have to exclude in that part for our regexp to work are @ and / but I think the list we currently have is reasonable.
Comment 3 User image Patrick Cloke [:clokep] 2012-10-01 21:45:24 PDT
Comment on attachment 666518 [details] [diff] [review]

The change looks good, I wish those regular expressions were a bit more readable, but I don't think there's a reasonable way to do that.
Comment 4 User image Florian Quèze [:florian] [:flo] 2012-10-02 06:37:45 PDT
Comment 5 User image Florian Quèze [:florian] [:flo] 2012-10-02 06:38:59 PDT
Comment on attachment 666518 [details] [diff] [review]

[Approval Request Comment]
Low risk, so I think we should take this on comm-aurora for Thunderbird 17.
Comment 6 User image Florian Quèze [:florian] [:flo] 2012-10-02 06:50:23 PDT
Comment 7 User image Florian Quèze [:florian] [:flo] 2012-10-05 11:20:29 PDT

Note You need to log in before you can comment on or make changes to this bug.