summaryrefslogtreecommitdiff
path: root/sleekxmpp/util
diff options
context:
space:
mode:
authorGraham <github@gra.dk>2014-05-14 22:25:09 +0100
committerGraham <github@gra.dk>2014-05-14 22:25:09 +0100
commit9434ae267ff7af08328061ed90526803f6f0a8a5 (patch)
treec2e6c73933dbe217eeff4c3ec37496e249666c70 /sleekxmpp/util
parent94187d215a87a9acb61dba8d0d0b60fb397f93be (diff)
downloadslixmpp-9434ae267ff7af08328061ed90526803f6f0a8a5.tar.gz
slixmpp-9434ae267ff7af08328061ed90526803f6f0a8a5.tar.bz2
slixmpp-9434ae267ff7af08328061ed90526803f6f0a8a5.tar.xz
slixmpp-9434ae267ff7af08328061ed90526803f6f0a8a5.zip
support 'success' phase correctly
When the GSSAPI mechanism's process() function is invoked for the third time (on success) it must not attempt further processing. Instead it should clean the context and return an empty response.
Diffstat (limited to 'sleekxmpp/util')
-rw-r--r--sleekxmpp/util/sasl/mechanisms.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/util/sasl/mechanisms.py b/sleekxmpp/util/sasl/mechanisms.py
index 6c2aeb04..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']