File: Fix 404 case with secret URLs

This commit is contained in:
Mia Herkt 2022-12-13 23:17:56 +01:00
parent aaf0e4492a
commit d5763a9854
No known key found for this signature in database
GPG Key ID: 72E154B8622EC191

View File

@ -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)