Hi Norman,
for an IQ query jabber:iq:register the transport returns a <registered/>
node even if the JID is not registered with the transport.
QUERY:
<iq to="yahoo.jabber.gmx.net" id="14" type="get">
<query xmlns="jabber:iq:register"/>
</iq>
REPLY (with CVS version and release 0.3):
<iq from="yahoo.jabber.gmx.net" to="[EMAIL PROTECTED]/GMX Messenger"
id="14"
type="result">
<query xmlns="jabber:iq:register">
<instructions>Please provide your Yahoo! username and
password</instructions>
<username/>
<password/>
<registered/>
</query>
</iq>
REPLY SHOULD BE:
<iq from="yahoo.jabber.gmx.net" to="[EMAIL PROTECTED]/GMX Messenger"
id="14"
type="result">
<query xmlns="jabber:iq:register">
<instructions>Please provide your Yahoo! username and
password</instructions>
<username/>
<password/>
</query>
</iq>
XEP-0077, 3.1: "If the host determines (based on the 'from' address)
that the entity is already registered, the IQ result that it sends in
response to the IQ get MUST contain an empty <registered/> element
(indicating that the entity is already registered)"
You will find the patch attached.
Regards,
-Michael
Norman Rasmussen wrote:
CVS is publicly read-only, and only the xmpppy devs can write to it
(the project admin can change the access). For now I'm very happy for
you to send patches to me (via the py-transports mailing lists), which
I'll apply to CVS for you.
--
Michael Dyrna
Systementwicklung
GMX GmbH, Frankfurter Ring 129, D-80807 München
Telefon +49 89 14339-515, Fax +49 89 14339-104
mailto:[EMAIL PROTECTED], http://www.gmx.de
Index: yahoo.py
===================================================================
RCS file: /cvsroot/xmpppy/xmpppy/yahoo-transport/yahoo.py,v
retrieving revision 1.64
diff -u -r1.64 yahoo.py
--- yahoo.py 20 Dec 2006 09:24:29 -0000 1.64
+++ yahoo.py 21 Feb 2007 15:48:00 -0000
@@ -679,15 +679,17 @@
username = []
password = []
fromjid = event.getFrom().getStripped().encode('utf8')
+ m = event.buildReply('result')
+ m.setQueryNS(NS_REGISTER)
if userfile.has_key(fromjid):
try:
username = userfile[fromjid]['username']
password = userfile[fromjid]['password']
except:
pass
- m = event.buildReply('result')
- m.setQueryNS(NS_REGISTER)
- m.setQueryPayload([Node('instructions', payload = 'Please provide your Yahoo! username and password'),Node('username',payload=username),Node('password',payload=password),Node('registered')])
+ m.setQueryPayload([Node('instructions', payload = 'Please provide your Yahoo! username and password'),Node('username',payload=username),Node('password',payload=password),Node('registered')])
+ else:
+ m.setQueryPayload([Node('instructions', payload = 'Please provide your Yahoo! username and password'),Node('username'),Node('password')])
self.jabberqueue(m)
#Add disco#info check to client requesting for rosterx support
i= Iq(to=event.getFrom(), frm=config.jid, typ='get',queryNS=NS_DISCO_INFO)
_______________________________________________
py-transports mailing list
[email protected]
http://lists.modevia.com/cgi-bin/mailman/listinfo/py-transports