-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wokkel.client.XMPPClient cannot authenticate when JID has escaped characters #5
Comments
I've now eventually gotten to where the SASL authentication is happening. In (Pdb) pp data
u'username="jeff\\40myserver.com",nonce="1172501009",digest-uri="xmpp/chat.myserver.com",charset=utf-8,realm="chat.myserver.com",qop=auth,cnonce="efc56d019622aa571e508307e02b2dbd",nc=00000001,response=63d142e6cfd18b9653aaf4a7f3d316c7' Here the username is still escaped correctly. I don't find anything wrong with what Wokkel is doing during the authentication so I'm starting to question my previous assumption that this is a bug in Wokkel. Could this be an issue with ejabberd? |
I used Pidgin to log in to ejabberd with an account that has a special character in it. I was able to authenticate successfully and tailing ejabberd's log showed why. Decoding the Base64 encoded data in the challenge response stanza sent from Pidgin to the XMPP server, showed the following:
The escaped I quickly hacked Ok, I'm happy it worked, but I don't understand why ejabberd expects there to be two backslashes (4 backslashes when escaped), instead of just one. XEP-106 dictates that Any idea why this is might be the case? Also, I'm not sure what the fix should look like. |
Hi @jcbrand! I found this bug https://support.process-one.net/browse/EJAB-81, but that's for pretty old versions of ejabberd. Which version are you talking against? |
Hi @ralphm :) I'm using 2.1.5 (which comes with debian squeeze). The ticket you mention points to this one (https://support.process-one.net/browse/EJAB-1006) where the user Badlop reports an issue that looks basically the same. That ticket is filed against an older version and they rejected it :o/ I've implemented a crude workaround for now and will sometime check against a newer version of ejabberd. I'm not sure whether anything should be done about this in Wokkel, so I guess you can close this ticket for now. Thanks! |
Hmm. Yeah, I think trying to solve this in Wokkel might introduce problems for others. Thanks for the report anyway. |
I'm using
wokkel.client.XMPPClient
to automatically authenticate my site's users to the XMPP server so that their vCards may be set.However, when I try to authenticate with users who have escaped characters in their JIDs (specifically
\40
for@
) I get aSASLAuthError
.Twisted gives the following log messages:
Ejabberd's log gives the following output:
What I find interesting from the ejabberd log is that the escaped character
\40
is shown as only40
. This is what made me realise that this has to do with the fact that there is an escaped character in the first place.Users without escaped characters in their JIDs authenticate fine.
As far as I can tell, my JID is correctly escaped, so I assume this must be a bug somewhere during the authentication routine.
I tried to dive into the Wokkel and Twisted code to debug this further but without luck.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: