diff options
author | Brian Beggs <macdiesel@gmail.com> | 2010-07-02 13:31:55 -0400 |
---|---|---|
committer | Tom Nichols <tmnichols@gmail.com> | 2010-07-09 15:26:26 -0400 |
commit | e835843aab9fa17deb8fc74d9fdbdfafdc66d83c (patch) | |
tree | 4c6d72a751a115f7f292a1f977c4dd4c8e4e9ab4 /sleekxmpp | |
parent | d6681f16d201ac4739d76ec03d5a89def37b8161 (diff) | |
download | slixmpp-e835843aab9fa17deb8fc74d9fdbdfafdc66d83c.tar.gz slixmpp-e835843aab9fa17deb8fc74d9fdbdfafdc66d83c.tar.bz2 slixmpp-e835843aab9fa17deb8fc74d9fdbdfafdc66d83c.tar.xz slixmpp-e835843aab9fa17deb8fc74d9fdbdfafdc66d83c.zip |
fixes to digest-md5 for ejabberd
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py index 061f68c1..4b33a2ef 100644 --- a/sleekxmpp/__init__.py +++ b/sleekxmpp/__init__.py @@ -250,8 +250,13 @@ class ClientXMPP(basexmpp, XMLStream): challenge = dict(challenge) logging.debug("MD5 auth challenge: %s", challenge) + if challenge.get('rspauth'): #authenticated success... send response + self.sendPriorityRaw("""<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>""") + return + + #TODO: use realm is supplied by server, use default qop unless supplied by server #Realm, nonce, qop should all be present - if not challenge['realm'] or not challenge['qop'] or not challenge['nonce']: + if not challenge.get('qop') or not challenge.get('nonce'): logging.error("Error during digest-md5 authentication. Challenge missing critical information. Challenge: %s" %base64.b64decode(xml.text)) self.disconnect() self.event("failed_auth") |