From 62671e0f56c0c24bb33b99377011267b8769387b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 20 Apr 2014 18:09:20 -0700 Subject: Fix using SCRAM with ejabberd --- sleekxmpp/util/sasl/mechanisms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/util/sasl') 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'') -- cgit v1.2.3