BOSH authentication - SASL namespace
pavelsmolka opened this issue · 1 comments
I have tried to implement BOSH pre-bind service, similar to this http_pre_bind example.
However, when trying to use it (or implement my own, slightly different), I have encountered the following bug. When the authentication is performed, wait_for_sasl_response()
in XMPPStream class does always classifies the response as unhandled.
It is caused by unexpected namespace of success element, which is passed to the handler as $stanza parameter (and by the way, imho not real "stanza", according to XMPP specification). The code expects the namespace to be NS_SASL ('urn:ietf:params:xml:ns:xmpp-sasl'), however I got simple 'jabber:client' namespace. Is this bug in JAXL or does the BOSH server send invalid respond?
I have temporarily "fixed" this by commenting out the namespace check in wait_for_sasl_response method. What's the reason to do the namespace check there? If it's not necessary, just let me know and I'll do the pull request with patch.
By the way, my code is using public https://bind.jappix.com/
BOSH service.
Well, when I use for example http://bosh.metajack.im:5280/xmpp-httpbind
, the namespace is correct (NS_SASL, the one expected by the method). Time to file an issue there... However, shouldn't we change the method anyway so any namespace response passes?