[jdev] Reproducability of XEP-0115: Entity Capabilities - 5.3 Complex Generation Example

Stephan Maka stephan at spaceboyz.net
Sun Apr 20 19:12:57 CDT 2008

Hi there

For a test suite, I am trying to reproduce the complex example from
XEP-0115 sect. 5.3. It doesn't work out so far:

Why isn't the hidden field FORM_TYPE appended to S? Exclusion of
hidden fields is not mentioned.

Why do "http://jabber.org/protocol/caps " and
"http://jabber.org/protocol/muc " include a trailing white-space,
opposed to their representation in the Service Discovery result?

And finally, with or without white-spaces, I just can't reproduce S:

$ irb
irb> require 'digest/sha1'
=> true
irb> require 'base64'
=> true
irb> Base64::encode64(Digest::SHA1::digest('client/pc/el/Ψ 0.9.1<client/pc/en/Psi 0.9.1<http://jabber.org/protocol/caps <http://jabber.org/protocol/disco#info<http://jabber.org/protocol/disco#items<http://jabber.org/protocol/muc <urn:xmpp:dataforms:softwareinfo<ip_version<ipv4<ipv6<os<Mac<os_version<10.5.1<software<Psi<software_version<0.11<'))
=> "x6aHVlwbIy3fQj0dVNR+j2xBloQ=\n"

According to XEP-0115, "8lu+88MRxmKM7yO3MEzY7YmTsWs=" is expected. I
don't want to nitpick, but exact results are crucial for the included
caps cache poisoning prevention.


More information about the JDev mailing list