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

Fix some errors caused by raising 403 in get_current_user #2919

Merged
merged 1 commit into from Oct 10, 2017

Conversation

Projects
None yet
3 participants
@minrk
Copy link
Member

minrk commented Oct 10, 2017

get_current_user is called in a few places that really shouldn’t raise

move the raising to get_login_url, which is called in @web.authenticated, where we want to replace redirect logic with 403.

@gnestor this fixes a regression in the 5.2 rc (introduced in #2853)

Fix some errors caused by raising 403 in get_current_user
get_current_user is called in a few places that really shouldn’t raise

move the raising to `get_login_url`, which is called in `@web.authenticated`,
where we want to replace redirect logic with 403.
@@ -507,7 +516,6 @@ def options(self, *args, **kwargs):
'accept, content-type, authorization, x-xsrftoken')
self.set_header('Access-Control-Allow-Methods',
'GET, PUT, POST, PATCH, DELETE, OPTIONS')
self.finish()

This comment has been minimized.

@minrk

minrk Oct 10, 2017

Author Member

finish is already called on every method, no need to include it explicitly

@minrk minrk added this to the 5.2 milestone Oct 10, 2017

@gnestor

This comment has been minimized.

Copy link
Contributor

gnestor commented Oct 10, 2017

Thanks @minrk!

@gnestor gnestor merged commit a8c6b8b into jupyter:master Oct 10, 2017

4 checks passed

codecov/patch 71.42% of diff hit (target 0%)
Details
codecov/project 79.12% (+0.04%) compared to 2ee51ab
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@minrk minrk deleted the minrk:fix-403 branch Oct 11, 2017

@gnestor gnestor modified the milestone: 5.2 Oct 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.