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.
This commit is contained in:
Graham 2014-05-14 22:25:09 +01:00
parent 94187d215a
commit 9434ae267f

View File

@ -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']