Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b8c76a0

Browse files
Ensure that delegated_creds is non-null when set
Previously, in the high-level API, we would unconditionally set wrap the return value of delegated_creds, which could result in delegated_creds being set to the default credentials when no delegated creds were returned (since the call would be `Credentials(None)`). This changes the logic so that delegated_creds stays set as `None` unless delegated_creds are actually returned. Partial solution for #96
1 parent 6175588 commit b8c76a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎gssapi/sec_contexts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ def _acceptor_step(self, token):
511511
res = rsec_contexts.accept_sec_context(token, self._creds,
512512
self, self._channel_bindings)
513513

514-
self.delegated_creds = Credentials(res.delegated_creds)
514+
if res.delegated_creds is not None:
515+
self.delegated_creds = Credentials(res.delegated_creds)
516+
else:
517+
self.delegated_creds = None
515518

516519
self._complete = not res.more_steps
517520

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /