Bug 22326 - Mishandles caps for bare JIDs, possibly causing crashes.
Summary: Mishandles caps for bare JIDs, possibly causing crashes.
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-06-16 14:33 UTC by Will Thompson
Modified: 2009-06-18 02:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.