From 9434ae267ff7af08328061ed90526803f6f0a8a5 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 14 May 2014 22:25:09 +0100 Subject: 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. --- sleekxmpp/util/sasl/mechanisms.py | 3 +++ 1 file changed, 3 insertions(+) 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'] -- cgit v1.2.3