-
Notifications
You must be signed in to change notification settings - Fork 101
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
Throw an exception in case of access denied #138
Merged
jborean93
merged 3 commits into
requests:master
from
AdrianVollmer:access_denied_exception
Oct 18, 2023
Merged
Throw an exception in case of access denied #138
jborean93
merged 3 commits into
requests:master
from
AdrianVollmer:access_denied_exception
Oct 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Huh, it worked for me earlier. I'll revisit tomorrow. |
jborean93
reviewed
Oct 17, 2023
Co-authored-by: Jordan Borean <[email protected]>
I pushed a commit with a test and a minor tweak, please let me know if you have any concerns about it, otherwise I'll merge this in at the end of my day. Thanks for the PR! |
No concerns on my side, appreciate your comments. Thanks! |
github-merge-queue bot
referenced
this pull request
in chezmoi-sh/atlas
Jun 10, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | OpenSSF | |---|---|---|---| | [requests-ntlm](https://togithub.com/requests/requests-ntlm) | minor | `==1.2.0` -> `==1.3.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/requests/requests-ntlm/badge)](https://securityscorecards.dev/viewer/?uri=github.com/requests/requests-ntlm) | --- ### Release Notes <details> <summary>requests/requests-ntlm (requests-ntlm)</summary> ### [`v1.3.0`](https://togithub.com/requests/requests-ntlm/releases/tag/v1.3.0) [Compare Source](https://togithub.com/requests/requests-ntlm/compare/v1.2.0...v1.3.0) #### What's Changed - Fix type annotation problem by setting correct pyspnego min version by [@​jborean93](https://togithub.com/jborean93) in [https://github.com/requests/requests-ntlm/pull/135](https://togithub.com/requests/requests-ntlm/pull/135) - Throw an exception in case of access denied by [@​AdrianVollmer](https://togithub.com/AdrianVollmer) in [https://github.com/requests/requests-ntlm/pull/138](https://togithub.com/requests/requests-ntlm/pull/138) - Favour pure NTLM provider and fix SPN by [@​jborean93](https://togithub.com/jborean93) in [https://github.com/requests/requests-ntlm/pull/137](https://togithub.com/requests/requests-ntlm/pull/137) - Add type annotation and black/isort checks by [@​jborean93](https://togithub.com/jborean93) in [https://github.com/requests/requests-ntlm/pull/140](https://togithub.com/requests/requests-ntlm/pull/140) - Update CI and version and ignore black diff by [@​jborean93](https://togithub.com/jborean93) in [https://github.com/requests/requests-ntlm/pull/141](https://togithub.com/requests/requests-ntlm/pull/141) #### New Contributors - [@​AdrianVollmer](https://togithub.com/AdrianVollmer) made their first contribution in [https://github.com/requests/requests-ntlm/pull/138](https://togithub.com/requests/requests-ntlm/pull/138) **Full Changelog**: requests/requests-ntlm@v1.2.0...v1.3.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/chezmoi-sh/atlas). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just had to debug an issue which was caused by insufficient permissions.
This line was raising
StopIteration
because the iterable was empty. It was empty because theWWW-Authenticate
header ofresponse2
only contained the stringNegotiate
. There was no challenge. The status code was 401 and in the body it contained a HTML message saying I had insufficient permission or invalid credentials (which is true).I'm not an expert in that protocol, but it seems that if there is no challenge in the second response, we can assume that access was denied and throw an exception accordingly.