Fix 500 on invalid paths
This commit is contained in:
parent
7661216bc0
commit
ed84d3752c
1 changed files with 4 additions and 0 deletions
4
fhost.py
4
fhost.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue