-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Conversation
try: | ||
if not os.path.isfile(filename): | ||
raise NotFound() | ||
except TypeError: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Thanks for the tips; I'm kinda new to serious software development ;) |
with app.test_request_context(): | ||
with pytest.raises(BadRequest): | ||
rv = flask.send_from_directory('static', 'bad\x00') | ||
rv.close() |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
LGTM! @ThiefMaster When merging this, you might want to merge into the |
Should I squash these commits before merge? |
yes, please! |
@ThiefMaster https://github.com/blog/2141-squash-your-commits On 2 April 2016 08:36:37 CEST, Adrian notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Awesome, thanks! |
Fixes issue #1761