diff options
author | Lance Stout <lancestout@gmail.com> | 2014-05-16 08:43:26 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-05-16 08:43:26 -0700 |
commit | 6ecc39b816b3ebf67922939748323164e89672d9 (patch) | |
tree | f1f718459f4bda68b02b96fbea7633d8f4f36617 | |
parent | ef2f5d29788218f679cd878e4e25bbd61545fef4 (diff) | |
parent | a918bf3a95f9accc7272edea4fe4fdab705a0b17 (diff) | |
download | slixmpp-6ecc39b816b3ebf67922939748323164e89672d9.tar.gz slixmpp-6ecc39b816b3ebf67922939748323164e89672d9.tar.bz2 slixmpp-6ecc39b816b3ebf67922939748323164e89672d9.tar.xz slixmpp-6ecc39b816b3ebf67922939748323164e89672d9.zip |
Merge pull request #292 from 4gra/develop
Fix support for jabberd2 with GSSAPI
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/mechanisms.py | 2 | ||||
-rw-r--r-- | sleekxmpp/util/sasl/mechanisms.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index f71a9c25..17ad5ed0 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -215,6 +215,8 @@ class FeatureMechanisms(BasePlugin): self.attempted_mechs.add(self.mech.name) self.xmpp.disconnect() else: + if resp.get_value() == '': + resp.del_value() resp.send(now=True) def _handle_success(self, stanza): diff --git a/sleekxmpp/util/sasl/mechanisms.py b/sleekxmpp/util/sasl/mechanisms.py index 36fcb928..d341ed3e 100644 --- a/sleekxmpp/util/sasl/mechanisms.py +++ b/sleekxmpp/util/sasl/mechanisms.py @@ -532,6 +532,9 @@ else: result = kerberos.authGSSClientStep(self.gss, b64_challenge) if result != kerberos.AUTH_GSS_CONTINUE: self.step = 1 + elif not challenge: + kerberos.authGSSClientClean(self.gss) + return b'' elif self.step == 1: username = self.credentials['username'] @@ -541,7 +544,7 @@ else: resp = kerberos.authGSSClientResponse(self.gss) except kerberos.GSSError as e: - raise SASLCancelled('Kerberos error: %s' % e.message) + raise SASLCancelled('Kerberos error: %s' % e) if not resp: return b'' else: |