Allow .. in data_dir path
This commit is contained in:
parent
9fd30b8853
commit
4e96ddfb9e
1 changed files with 5 additions and 6 deletions
|
@ -278,11 +278,10 @@ class SiteStorage(object):
|
|||
if not inner_path:
|
||||
return self.directory
|
||||
|
||||
file_path = u"%s/%s" % (self.directory, inner_path)
|
||||
if ".." in inner_path:
|
||||
raise Exception(u"File not allowed: %s" % inner_path)
|
||||
|
||||
if ".." in file_path:
|
||||
raise Exception(u"File not allowed: %s" % file_path)
|
||||
return file_path
|
||||
return u"%s/%s" % (self.directory, inner_path)
|
||||
|
||||
# Get site dir relative path
|
||||
def getInnerPath(self, path):
|
||||
|
|
Loading…
Reference in a new issue