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

@minrk minrk Oct 10, 2017

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

Loading

@minrk minrk added this to the 5.2 milestone Oct 10, 2017
@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 10, 2017

Thanks @minrk!

Loading

@gnestor gnestor merged commit a8c6b8b into jupyter:master Oct 10, 2017
4 checks passed
Loading
@minrk minrk deleted the fix-403 branch Oct 11, 2017
@gnestor gnestor removed this from the 5.2 milestone Oct 13, 2017
@gnestor gnestor added this to the 5.2 milestone 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants