summaryrefslogtreecommitdiff
path: root/sleekxmpp/util
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2014-04-20 18:09:20 -0700
committerLance Stout <lancestout@gmail.com>2014-04-20 18:09:20 -0700
commit62671e0f56c0c24bb33b99377011267b8769387b (patch)
treefbd542f53abeb1b1c21d0e480723b1c64921730c /sleekxmpp/util
parent8282d135cccbf71484b130f51e2724006791428a (diff)
downloadslixmpp-62671e0f56c0c24bb33b99377011267b8769387b.tar.gz
slixmpp-62671e0f56c0c24bb33b99377011267b8769387b.tar.bz2
slixmpp-62671e0f56c0c24bb33b99377011267b8769387b.tar.xz
slixmpp-62671e0f56c0c24bb33b99377011267b8769387b.zip
Fix using SCRAM with ejabberd
Diffstat (limited to 'sleekxmpp/util')
-rw-r--r--sleekxmpp/util/sasl/mechanisms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/util/sasl/mechanisms.py b/sleekxmpp/util/sasl/mechanisms.py
index 523eabc2..36fcb928 100644
--- a/sleekxmpp/util/sasl/mechanisms.py
+++ b/sleekxmpp/util/sasl/mechanisms.py
@@ -287,7 +287,9 @@ class SCRAM(Mech):
if nonce[:len(self.cnonce)] != self.cnonce:
raise SASLCancelled('Invalid nonce')
- cbind_data = self.credentials['channel_binding']
+ cbind_data = b''
+ if self.use_channel_binding:
+ cbind_data = self.credentials['channel_binding']
cbind_input = self.gs2_header + cbind_data
channel_binding = b'c=' + b64encode(cbind_input).replace(b'\n', b'')