From d5763a985491547a715a006ec3ccdc371c81623d Mon Sep 17 00:00:00 2001 From: Mia Herkt Date: Tue, 13 Dec 2022 23:17:56 +0100 Subject: [PATCH] File: Fix 404 case with secret URLs --- fhost.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fhost.py b/fhost.py index eb30a9d..faf6d03 100755 --- a/fhost.py +++ b/fhost.py @@ -439,10 +439,11 @@ def get(path, secret=None): if sufs: f = File.query.get(id) - if f.secret != secret: - abort(404) if f and f.ext == sufs: + if f.secret != secret: + abort(404) + if f.removed: abort(451)