[Pidgin] #556: jabber service discovery

Pidgin trac at pidgin.im
Sun Feb 8 04:15:30 EST 2009


#556: jabber service discovery
------------------------------------+---------------------------------------
 Reporter:  shaman                  |        Owner:  deryni
     Type:  patch                   |       Status:  new   
Milestone:  Patches Needing Review  |    Component:  XMPP  
  Version:  2.0                     |   Resolution:        
 Keywords:                          |  
------------------------------------+---------------------------------------

Comment(by Shambler0):

 Thank you, I have applied the correction and here are the results:

 Registering on transports is now mostly successfull: ICQ, MSN and some
 other transports register, unregister, login, logoff and work fine.

 It seems that "x:data" support is missing, so registration forms employing
 that won't be displayed (example: conference.jabber.org)

 Before replacing jabber_disco_service_register(), x:data support was
 present, but all servers would just reply to a registration attempt with
 the same registration form...

 I tried closely examining the logs for x:data-enabled forms, and the only
 difference I found is that attribute type="text-single" is not sent by
 pidgin:

 Pidgin log (before replacing the fuction)
 {{{
 <iq type='get' id='purple6c318d37' to='conference.jabber.org'>
         <query xmlns='jabber:iq:register'/>
 </iq>

 <iq from='conference.jabber.org' to='shambler0 at jabber.org/Home'
 id='purple6c318d37' type='result'>
         <query xmlns='jabber:iq:register'>
                 <instructions>You need an x:data capable client to
 register nickname</instructions>
                 <x xmlns='jabber:x:data'>
                         <title>Nickname Registration at
 conference.jabber.org</title>
                         <instructions>Enter nickname you want to
 register</instructions>
                         <field type='text-single' label='Nickname'
 var='nick'>
                                 <value/>
                         </field>
                 </x>
         </query>
 </iq>

 <iq type='get' id='purple6c318d38' to='conference.jabber.org'>
         <query xmlns='jabber:iq:register'>
                 <x xmlns='jabber:x:data' type='submit'>
                         <field var='nick'>
                                 <value>Shambler0</value>
                         </field>
                 </x>
         </query>
 </iq>

 <iq from='conference.jabber.org' to='shambler0 at jabber.org/Home'
 id='purple6c318d38' type='result'>
         <query xmlns='jabber:iq:register'>
                 <instructions>You need an x:data capable client to
 register nickname</instructions>
                 <x xmlns='jabber:x:data'>
                         <title>Nickname Registration at
 conference.jabber.org</title>
                         <instructions>Enter nickname you want to
 register</instructions>
                         <field type='text-single' label='Nickname'
 var='nick'>
                                 <value/>
                         </field>
                 </x>
         </query>
 </iq>

 }}}

 The same attempt on PSI succeeds:
 {{{

 <iq type="get" to="conference.jabber.org" id="ace2a" >
 <query xmlns="jabber:iq:register"/>
 </iq>

 <iq from="conference.jabber.org" type="result" id="ace2a"
 to="shambler0 at jabber.snc.ru/Psi" >
 <query xmlns="jabber:iq:register">
 <instructions>You need an x:data capable client to register
 nickname</instructions>
 <x xmlns="jabber:x:data">
 <title>Nickname Registration at conference.jabber.org</title>
 <instructions>Enter nickname you want to register</instructions>
 <field type="text-single" label="Nickname" var="nick" >
 <value/>
 </field>
 </x>
 </query>
 </iq>

 <iq type="set" to="conference.jabber.org" id="ace3a" >
 <query xmlns="jabber:iq:register">
 <x xmlns="jabber:x:data" type="submit" >
 <field type="text-single" var="nick" >
 <value>Shambler0</value>
 </field>
 </x>
 </query>
 </iq>

 <iq from="conference.jabber.org" type="result" id="ace3a"
 to="shambler0 at jabber.org/Psi" >
 <query xmlns="jabber:iq:register"/>
 </iq>

 <iq type="get" to="conference.jabber.org" id="ace4a" >
 <query xmlns="jabber:iq:register"/>
 </iq>

 }}}


 ----


 It also appears that all forms that do not have an x:data tag in them
 crash pidgin (in case the function is not replaced as you suggested):

 {{{
 (11:53:29) jabber: Sending (ssl): <iq type='get' id='purplef83e4642'
 to='icq.gajim.org'><query xmlns='jabber:iq:register'/></iq>
 (11:53:30) jabber: Recv (ssl)(267): <iq from='icq.gajim.org'
 to='testacct at jabber.org/pidgin' id='purplef83e4642' type='result'><query
 xmlns='jabber:iq:register'><instructions>Please type your ICQ user id
 number into the username field and your
 password.</instructions><username/><password/></query></iq>
 }}}
 {{{
 Call stack:
 C:\BIN\OS\WINXP32\Program_Files\Common_Files\GTK\2.0\bin\libglib-2.0-0.dll
 [2.18.3.0]
 685E4D02
 C:\BIN\OS\WINXP32\Program_Files\Common_Files\GTK\2.0\bin\libglib-2.0-0.dll
 g_list_last
 685E4D45
 C:\BIN\OS\WINXP32\Program_Files\Common_Files\GTK\2.0\bin\libglib-2.0-0.dll
 g_list_append
 0274F20E c:\BIN\Net\Messenger\pidgin\libjabber.dll  jabber_disco_get_list
 027513A1 c:\BIN\Net\Messenger\pidgin\libjabber.dll  jabber_iq_parse
 02757C76 c:\BIN\Net\Messenger\pidgin\libjabber.dll  jabber_process_packet
 0275CB8F c:\BIN\Net\Messenger\pidgin\libjabber.dll  jabber_oob_parse
 }}}

 Full crash logs, if you need them, are there:
 http://www.mediafire.com/?nkmnyx0fgbg


 ----


 Sometimes, a server does not request a username or a password, or both,
 but pidgin still displays these textboxes, and sends data entered there
 back to the server.

 Servers are likely to ignore the excessive information, but it may confuse
 users a bit.

 (example: mrim.jabber.snc.ru / mrim.jabber.ru / mrim.udaff.com ; use
 Email:testacc at mail.ru and Password:qwerty to test, if you wish)

 Successfull registration log
 {{{
 <iq from='mrim.jabber.snc.ru' to='shambler0 at jabber.snc.ru/Home'
 id='purple15c00001' type='result'>
         <query xmlns='jabber:iq:register'>
                 <instructions>(russian text here: "Enter your email and
 password.")</instructions>
                 <email/>
                 <password/>
         </query>
 </iq>
 <iq type='set' id='purple15c00011' to='mrim.jabber.snc.ru'>
         <query xmlns='jabber:iq:register'>
                 <username/>
                 <password>qwerty</password>
                 <email>testacc at mail.ru</email>
         </query>
 </iq>

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/556#comment:43>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list