From 98ba4b0acdb8ad0e4e81fc082dcb1cbdcdf1ce1f Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 27 Mar 2019 18:57:30 +0100 Subject: Return 404 if physical file does not exist --- fbin/fbin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fbin') 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//', 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()) -- cgit v1.2.3