Raise BadRequest if static file name is invalid#1763
Raise BadRequest if static file name is invalid#1763untitaker merged 3 commits intopallets:masterfrom
Conversation
flask/helpers.py
Outdated
| 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 ;) |
tests/test_helpers.py
Outdated
| 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