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

Raise BadRequest if static file name is invalid #1763

Merged
merged 3 commits into from Apr 2, 2016

Conversation

@chaosagent
Copy link
Contributor

@chaosagent chaosagent commented Apr 1, 2016

Fixes issue #1761

try:
if not os.path.isfile(filename):
raise NotFound()
except TypeError:

This comment has been minimized.

Loading

@chaosagent
Copy link
Contributor Author

@chaosagent chaosagent commented Apr 1, 2016

Thanks for the tips; I'm kinda new to serious software development ;)

Loading

with app.test_request_context():
with pytest.raises(BadRequest):
rv = flask.send_from_directory('static', 'bad\x00')
rv.close()

This comment has been minimized.

Loading

@untitaker
Copy link
Member

@untitaker untitaker commented Apr 1, 2016

LGTM!

@ThiefMaster When merging this, you might want to merge into the 0.10-maintenance branch, and then merge 0.10-maintenance into master, such that we can do a bugfix-release without releasing 1.0. Just make sure you only merge this PRs changes, not all the commits from master.

Loading

@chaosagent
Copy link
Contributor Author

@chaosagent chaosagent commented Apr 2, 2016

Should I squash these commits before merge?

Loading

@ThiefMaster
Copy link
Member

@ThiefMaster ThiefMaster commented Apr 2, 2016

yes, please!

Loading

@untitaker
Copy link
Member

@untitaker untitaker commented Apr 2, 2016

@ThiefMaster https://github.com/blog/2141-squash-your-commits

On 2 April 2016 08:36:37 CEST, Adrian notifications@github.com wrote:

yes, please!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1763 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Loading

@untitaker untitaker merged commit 9f1be8e into pallets:master Apr 2, 2016
1 check passed
Loading
@untitaker
Copy link
Member

@untitaker untitaker commented Apr 2, 2016

Awesome, thanks!

Loading

untitaker added a commit that referenced this issue Apr 2, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants