Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise exception on unknown usage #203

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

frozencemetery
Copy link
Member

Previously, we defaulted to conservatively assuming BOTH for usage type
when it wasn't obviously INITIATE or ACCEPT. In most simple cases, this
will cause invalid values to behave as the user intended. However, it
may cause mysterious failures in more complex cases. Err on the side of
caution and raise ValueError when we can't determine the intented usage.

Resolves: #202

Previously, we defaulted to conservatively assuming BOTH for usage type
when it wasn't obviously INITIATE or ACCEPT.  In most simple cases, this
will cause invalid values to behave as the user intended.  However, it
may cause mysterious failures in more complex cases.  Err on the side of
caution and raise ValueError when we can't determine the intented usage.

Resolves: pythongssapi#202
@simo5
Copy link
Contributor

simo5 commented Apr 28, 2020

wow, that's a lot of duplication, I wonder if a single helper function wouldn't be possible.
Other than that LGTM

@frozencemetery
Copy link
Member Author

It probably is; I'd accept a follow-on patch to make that change.

@michael-o
Copy link
Contributor

I agree with @simo5. Happy with the change.

@frozencemetery frozencemetery merged commit 21e2da6 into pythongssapi:master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid cred usage not rejected
3 participants