diff options
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/stanza/auth.py')
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/stanza/auth.py | 5 |
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') |