summaryrefslogtreecommitdiff
path: root/sleekxmpp/features/feature_mechanisms/stanza/auth.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-02-09 22:01:11 -0800
committerLance Stout <lancestout@gmail.com>2012-02-09 22:01:11 -0800
commitc1357717d952999a0aca7d96bf15d72ada01e75b (patch)
tree17d30376742cfd95113cb9f66d771ae449b3a312 /sleekxmpp/features/feature_mechanisms/stanza/auth.py
parentca5145c21064ec75f2c388dd4b6e3afee8da1a21 (diff)
downloadslixmpp-c1357717d952999a0aca7d96bf15d72ada01e75b.tar.gz
slixmpp-c1357717d952999a0aca7d96bf15d72ada01e75b.tar.bz2
slixmpp-c1357717d952999a0aca7d96bf15d72ada01e75b.tar.xz
slixmpp-c1357717d952999a0aca7d96bf15d72ada01e75b.zip
Use '=' as base64 value for empty string SASL results.
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/stanza/auth.py')
-rw-r--r--sleekxmpp/features/feature_mechanisms/stanza/auth.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/stanza/auth.py b/sleekxmpp/features/feature_mechanisms/stanza/auth.py
index d2a981f9..a366f72a 100644
--- a/sleekxmpp/features/feature_mechanisms/stanza/auth.py
+++ b/sleekxmpp/features/feature_mechanisms/stanza/auth.py
@@ -41,7 +41,10 @@ class Auth(StanzaBase):
def set_value(self, values):
if not self['mechanism'] in self.plain_mechs:
- self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
+ if values:
+ self.xml.text = bytes(base64.b64encode(values)).decode('utf-8')
+ else:
+ self.xml.text = '='
else:
self.xml.text = bytes(values).decode('utf-8')