Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't allow an upload if in non-public mode and there was no Authorization header in the request #1402

Closed

Conversation

mig5
Copy link
Collaborator

@mig5 mig5 commented Aug 24, 2021

Fixes #1396

I am still not clear on why the subclassed Request middleware is triggered before the HTTPAuth's app.before_request() decorator is applied to the request, but in any case, this should fix the issue.

I expanded the test to not only check for the 401 response but also that an uploaded message should not exist on disk.

@mig5 mig5 requested a review from micahflee as a code owner August 24, 2021 00:52
Copy link
Member

@SaptakS SaptakS left a comment

Choose a reason for hiding this comment

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

LGTM

@mig5
Copy link
Collaborator Author

mig5 commented Aug 27, 2021

This will be made obsolete by #1404 if it goes in instead.

@SaptakS
Copy link
Member

SaptakS commented Aug 30, 2021

I think this can be closed since #1404 got merged.

@SaptakS SaptakS closed this Aug 30, 2021
@mig5 mig5 deleted the dont_upload_if_no_auth_and_non_public branch September 1, 2021 02:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File uploaded before checking for user's authentication
2 participants