Bug 21229 - Violates a XEP's MUST by trying to register with incomplete information
Summary: Violates a XEP's MUST by trying to register with incomplete information
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-04-16 09:54 UTC by Will Thompson
Modified: 2009-04-28 03:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2009-04-16 09:54:28 UTC
From get_reply_cb (I added this a couple of days ago):

  /* FIXME: "The requesting entity MUST provide information for all of the
   *        elements (other than <instructions/>) contained in the IQ result."
   *        What should we do if the IQ contains <email/> or something else
   *        that we can't provide? Currently we just submit the form anyway and
   *        hope for the best.
   */

This seems to have become a practical problem: I just tried to register with jabber.org and it failed pretty miserably, since it now requires email address and real name. From LM_DEBUG=net (reformatted for clarity):

--> <iq type="get" id="268488301266">
        <query xmlns="jabber:iq:register"></query>
    </iq>

<-- <iq id='268488301266' type='result'>
        <query xmlns='jabber:iq:register'>
            <name/>
            <email/>
            <instructions>Additional information is needed to register.</instructions>
            <username/>
            <password/>
        </query>
    </iq>

--> <iq type="set" id="135881693239">
        <query xmlns="jabber:iq:register">
            <username>snhostnaosntuoesnuoeustnueostnuaoshuoanstuoeastnuoeanshuoestneostno</username>
            <password>snhaoestnuatsheuahtsaauosnauoenthaoenthauonoha</password>
        </query>
    </iq>

<-- <iq id='135881693239' type='result'/>

(Yes, jabber.org says it worked. So maybe it lied to us.)

At this point Gabble fell down a well:

    ** (telepathy-gabble:28074): DEBUG: registration_finished_cb: succeeded
    ** (telepathy-gabble:28074): DEBUG: do_auth: authenticating with username: snhostnaosntuoesnuoeustnueostnuaoshuoanstuoeastnuoeanshuoestneostno, password: <hidden>, resource: Telepathy
    ** (telepathy-gabble:28074): DEBUG: gabble_register_dispose: dispose called
    ** (telepathy-gabble:28074): DEBUG: gabble_register_finalize: called with 0x90fc70

and that was it.

Gabble can't supply the extra information, so it MUST fail the registration process per the XEP. So I guess maybe we need a new Registration interface, possibly *shock* using vCard fields from ContactInfo! \o/
Comment 1 Will Thompson 2009-04-17 03:01:20 UTC
(In reply to comment #0)
> This seems to have become a practical problem: I just tried to register with
> jabber.org and it failed pretty miserably, since it now requires email address
> and real name.

Today, it seems to only require username and password again.

Good times all round.
Comment 2 Will Thompson 2009-04-17 03:24:14 UTC
My branch 'registration' make Gabble fail sooner on server that require more (or indeed less) information than it can provide.

 src/register.c                 |   77 ++++++++++++++++++++++------------------
 tests/twisted/test-register.py |   26 +++++++-------
 2 files changed, 55 insertions(+), 48 deletions(-)
Comment 3 Guillaume Desmottes 2009-04-28 03:11:50 UTC
Branch looks good to me.
Comment 4 Will Thompson 2009-04-28 03:31:42 UTC
commit d2cf2a7ee663e37ad72b7facda3db349918728a9
Merge: c8d2033 360dd3f
Author: Will Thompson <will.thompson@collabora.co.uk>
Date:   Tue Apr 28 11:26:25 2009 +0100

    Merge branch 'registration'
    
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>

 src/register.c                 |   77 ++++++++++++++++++++++------------------
 tests/twisted/test-register.py |   26 +++++++-------
 2 files changed, 55 insertions(+), 48 deletions(-)


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.