diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2019-03-27 18:57:30 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2019-03-27 18:57:30 +0100 |
commit | 98ba4b0acdb8ad0e4e81fc082dcb1cbdcdf1ce1f (patch) | |
tree | 9ed65010ea8751678b92ce3f458aad7b4151f624 | |
parent | a27a916a1fcb9f62a9f075d1316346ff2e6424b2 (diff) |
Return 404 if physical file does not exist
-rwxr-xr-x | fbin/fbin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fbin/fbin.py b/fbin/fbin.py index af35bdb..91fa1c9 100755 --- a/fbin/fbin.py +++ b/fbin/fbin.py @@ -207,7 +207,7 @@ def uploaded(hash): @app.route('/file/<hash:hash>/<path:filename>', endpoint = 'file') def _file(hash, ext=None, filename=None): f = get_file(hash) - if not f: + if not f or not f.exists: abort(404) return send_file(f.get_path()) |