summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMia Herkt <mia@0x0.st>2022-12-13 23:17:56 +0100
committerMia Herkt <mia@0x0.st>2022-12-13 23:17:56 +0100
commitd5763a985491547a715a006ec3ccdc371c81623d (patch)
tree8ae30f2f0064dd1eecee231e5541fd18de2c946d
parentaaf0e4492adb89394ee2acd88bda12413107c5be (diff)
File: Fix 404 case with secret URLs
-rwxr-xr-xfhost.py5
1 files 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)