summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Beggs <macdiesel@gmail.com>2010-07-01 08:44:39 -0400
committerBrian Beggs <macdiesel@gmail.com>2010-07-01 08:44:39 -0400
commitfff54eaf2f069db22c2a0a3cf0e522d628e188b3 (patch)
treef4acf591b07ce835efe5761a2c797fea4fde1b93
parent488d5b29d44fa0bc1597f75d3a5b000fe1970db9 (diff)
downloadslixmpp-fff54eaf2f069db22c2a0a3cf0e522d628e188b3.tar.gz
slixmpp-fff54eaf2f069db22c2a0a3cf0e522d628e188b3.tar.bz2
slixmpp-fff54eaf2f069db22c2a0a3cf0e522d628e188b3.tar.xz
slixmpp-fff54eaf2f069db22c2a0a3cf0e522d628e188b3.zip
temporary removed future support for sleek to support digest-md5 auth
-rw-r--r--sleekxmpp/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py
index 2bc59444..cf43ede7 100644
--- a/sleekxmpp/__init__.py
+++ b/sleekxmpp/__init__.py
@@ -7,7 +7,6 @@
See the file license.txt for copying permission.
"""
-from __future__ import absolute_import
from . basexmpp import basexmpp
from xml.etree import cElementTree as ET
from . xmlstream.xmlstream import XMLStream
@@ -257,8 +256,8 @@ class ClientXMPP(basexmpp, XMLStream):
for i in range(7):
cnonce+=hex(int(random.random()*65536*4096))[2:]
cnonce = base64.encodestring(cnonce)[0:-1]
-
- a1 = "%s:%s:%s" %(md5("%s:%s:%s" % (self.username, self.domain, self.password)), challenge["nonce"], cnonce )
+ a1 = md5("%s:%s:%s" % (self.username, self.domain, self.password))
+ a1 = "%s:%s:%s" %(a1, challenge["nonce"], cnonce )
a2 = "AUTHENTICATE:xmpp/%s" %self.domain
responseHash = md5digest("%s:%s:00000001:%s:auth:%s" %(md5digest(a1), challenge["nonce"], cnonce, md5digest(a2) ) )
response = '''charset=utf-8,username="%s",realm="%s",nonce="%s",nc=00000001,cnonce="%s",digest-uri="%s",response=%s,qop=%s,''' %(self.username, self.domain, challenge["nonce"], cnonce, "xmpp/%s" % self.domain, responseHash, challenge["qop"])