[jdev] xmppping - simple XEP-0199 pinging script

Peter Saint-Andre stpeter at jabber.org
Fri Jan 5 12:45:42 CST 2007


Maciek Niedzielski wrote:
> Peter Saint-Andre wrote:
>> See here:
>>
>> http://www.xmpp.org/internet-drafts/draft-saintandre-rfc3921bis-00.html#rules
> 
> Hmm... I just noticed something.
> 
> Let's say we're pinging a client which does not support ping namespace:
> 
> Example 9. Ping Not Supported
> 
> <iq from='juliet at capulet.com/chamber'
>     to='romeo at montague.net/home'
>     id='ping345'
>     type='result'>
>   <ping xmlns='urn:xmpp:ping'/>
>   <error type='cancel'>
>     <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
>   </error>
> </iq>
> 
> Now 3921bis says:
> 3. Else if the JID is of the form <user at domain/resource> and no
> connected or available resource matches the full JID, the recipient's
> server (...)  MUST return a <service-unavailable/> stanza error to the
> sender if it is an IQ stanza
> 
> So the reply above may mean both a pong and a not-pong, and it's
> impossible to tell the difference.

That's right, it's impossible to tell the difference. And that's a 
feature, because we try to discourage directory harvesting attacks.

Peter

-- 
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.shtml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20070105/37b203f1/attachment-0002.bin>


More information about the JDev mailing list