Fix 500 on invalid paths
This commit is contained in:
parent
7661216bc0
commit
ed84d3752c
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:
|
||||||
|
|
Loading…
Reference in New Issue