Bug 41719 - Wocky not compliant to XEP-0115 (caps) for broken dataforms
Summary: Wocky not compliant to XEP-0115 (caps) for broken dataforms
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.freedesktop.org/~jonny/wo...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-10-12 07:50 UTC by Alban Crequy
Modified: 2011-11-15 06:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Alban Crequy 2011-10-12 07:50:58 UTC
http://xmpp.org/extensions/xep-0115.html#ver-proc
section "5.4 Processing Method", bullet point 3.6:

> If the response includes an extended service discovery information
> form where the FORM_TYPE field is not of type "hidden" or the form
> does not include a FORM_TYPE field, ignore the form but continue
> processing.

Wocky does not respect that. In wocky/wocky-caps-hash.c wocky_caps_hash_compute_from_lists():
      field = g_hash_table_lookup (dataform->fields, "FORM_TYPE");
      if (field == NULL)
        {
          DEBUG ("Data form is missing FORM_TYPE field");
          goto cleanup;
        }
Then, it returns NULL, and 
src/presence-cache.c _caps_disco_cb() considers the hash to be bad:
      computed_hash = wocky_caps_hash_compute_from_node (query_result);
      if (computed_hash == NULL)
        {
          DEBUG ("Unable to compute caps hash for '%s'.", jid);
          trust = 0;
          bad_hash = TRUE;
        }
Comment 1 Jonny Lamb 2011-10-13 07:18:43 UTC
Here's a fix.
Comment 2 Will Thompson 2011-10-31 09:25:16 UTC
looks fine


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.