mirror of
https://git.0x0.st/mia/0x0.git
synced 2026-01-09 20:11:46 +03:00
Fix 500 on invalid paths
This commit is contained in:
4
fhost.py
4
fhost.py
@@ -408,6 +408,10 @@ def get(path):
|
|||||||
path = Path(path.split("/", 1)[0])
|
path = Path(path.split("/", 1)[0])
|
||||||
sufs = "".join(path.suffixes[-2:])
|
sufs = "".join(path.suffixes[-2:])
|
||||||
name = path.name[:-len(sufs) or None]
|
name = path.name[:-len(sufs) or None]
|
||||||
|
|
||||||
|
if "." in name:
|
||||||
|
abort(404)
|
||||||
|
|
||||||
id = su.debase(name)
|
id = su.debase(name)
|
||||||
|
|
||||||
if sufs:
|
if sufs:
|
||||||
|
|||||||
Reference in New Issue
Block a user