-
Notifications
You must be signed in to change notification settings - Fork 116
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
Handle malformed Authorization headers without a 500. #41
Open
alexdutton
wants to merge
41
commits into
hiidef:develop
Choose a base branch
from
ox-it:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Swap simplejson out for stdlib json in the testsites api test
Use new style variable assignment to avoid issues with python version support and remove variable assignment when it's not being used.
Tidy up Exception Handling
Add django-nose and the test stubs
…f current oauth2 draft.
Issue a new access token in refreshing flow
Section 6 of the OAuth2 RFC says that if scope parameter is omitted it "is treated as equal to the scope originally granted by the resource owner." Previously oauth2app cleared the scope if the scope parameter was omitted. Fixes hiidef#51.
Conflicts: oauth2app/authenticate.py oauth2app/authorize.py oauth2app/models.py oauth2app/token.py setup.py tests/testsite/apps/api/tests/__init__.py tests/testsite/apps/api/tests/base.py tests/testsite/apps/api/tests/mac.py tests/testsite/apps/api/tests/responsetype.py tests/testsite/apps/api/tests/scope.py
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.
There's an uncaught exception when the Authentication header is empty, as handily pointed out by the Googlebot:
I noticed another part susceptible to this problem in oauth2app.token, where an Authentication header that didn't split() into at least two parts would throw an error, which I've also fixed.