diff options
| author | Mia Herkt <mia@0x0.st> | 2022-12-01 01:26:32 +0100 |
|---|---|---|
| committer | Mia Herkt <mia@0x0.st> | 2022-12-01 01:26:32 +0100 |
| commit | ed84d3752c56f06e73876af0ab162999562a9d61 (patch) | |
| tree | 1b02aa1a7b7a385bee706f9d082477098e4de93f /fhost.py | |
| parent | 7661216bc00e072aec72a0047c867fbf90dbf9bf (diff) | |
Fix 500 on invalid paths
Diffstat (limited to 'fhost.py')
| -rwxr-xr-x | fhost.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -408,6 +408,10 @@ def get(path): path = Path(path.split("/", 1)[0]) sufs = "".join(path.suffixes[-2:]) name = path.name[:-len(sufs) or None] + + if "." in name: + abort(404) + id = su.debase(name) if sufs: |
