Fix static mounts using relative paths and prevent traversal exploits (#554)

Thanks, @abdusco! Closes #555
This commit is contained in:
Abdus 2019-07-11 19:13:19 +03:00 committed by Simon Willison
commit 74ecf8a7cc
3 changed files with 9 additions and 2 deletions

View file

@ -67,6 +67,8 @@ def test_static_mounts():
assert response.status == 200
response = client.get("/custom-static/not_exists.py")
assert response.status == 404
response = client.get("/custom-static/../LICENSE")
assert response.status == 404
def test_memory_database_page():