Raise exception on invalid path
This commit is contained in:
parent
22059e71a2
commit
45e2b350a9
1 changed files with 3 additions and 0 deletions
|
@ -330,6 +330,9 @@ class UiRequest(object):
|
|||
if path.endswith("/"):
|
||||
path = path + "index.html"
|
||||
|
||||
if ".." in path:
|
||||
raise Exception("Invalid path")
|
||||
|
||||
match = re.match("/media/(?P<address>[A-Za-z0-9\._-]+)/(?P<inner_path>.*)", path)
|
||||
if match:
|
||||
path_parts = match.groupdict()
|
||||
|
|
Loading…
Reference in a new issue