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

minrk
Copy link
Member

@minrk 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)

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()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

gnestor commented Oct 10, 2017

Thanks @minrk!

@gnestor gnestor merged commit a8c6b8b into jupyter:master Oct 10, 2017
@minrk minrk deleted the fix-403 branch October 11, 2017 08:40
@gnestor gnestor modified the milestone: 5.2 Oct 13, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants