Allow some paths to contain .. but not ../
This commit is contained in:
parent
822dec5c03
commit
743f92d15e
2 changed files with 3 additions and 3 deletions
|
@ -382,7 +382,7 @@ class SiteStorage(object):
|
|||
if not inner_path:
|
||||
return self.directory
|
||||
|
||||
if ".." in inner_path:
|
||||
if "../" in inner_path:
|
||||
raise Exception("File not allowed: %s" % inner_path)
|
||||
|
||||
return "%s/%s" % (self.directory, inner_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue