Bug 22326

Summary: Mishandles caps for bare JIDs, possibly causing crashes.
Product: Telepathy Reporter: Will Thompson <will>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=shortlog;h=refs/heads/caps-from-bare-jid
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2009-06-16 14:33:43 UTC
Gabble currently mishandles capabilities from bare JIDs. At best, it will look them up and ignore the result, but it crashes on the following (admittedly unlikely) scenario:

* Gets presence from a bare JID, including a caps hash;
* Discoes the bare JID to discover what the caps hash means;
* Gets presence from a qualified JID;
* Gets the disco response.

My branch 'caps-from-bare-jid' fixes this, and also tidies up some ugliness in some of the caps tests I noticed.
Comment 1 Guillaume Desmottes 2009-06-18 00:52:27 UTC
9852b5d548462440e76d207d6743715805cfb88b
Would be good to add a test including dataforms. The complex example from http://xmpp.org/extensions/xep-0115.html#ver probably

e94e51b400b2b82d75f91f5dd1f9c8cf181bf83c
+    c['ver'] = 'ceci=nest=pas=une=hash'
*un* hash ;)

Comment 2 Will Thompson 2009-06-18 02:05:14 UTC
(In reply to comment #1)
> 9852b5d548462440e76d207d6743715805cfb88b
> Would be good to add a test including dataforms. The complex example from
> http://xmpp.org/extensions/xep-0115.html#ver probably

I've added that example to caps_helper.py.

> e94e51b400b2b82d75f91f5dd1f9c8cf181bf83c
> +    c['ver'] = 'ceci=nest=pas=une=hash'
> *un* hash ;)

Desolé. J'ai fixé ça. 

Comment 3 Will Thompson 2009-06-18 02:37:23 UTC
Merged with fixes, will be in 0.7.29. Thanks for the review!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.