Allow .. in data_dir path

This commit is contained in:
shortcutme 2017-01-11 13:12:35 +01:00
parent 9fd30b8853
commit 4e96ddfb9e
No known key found for this signature in database
GPG key ID: 9557210F5E536D3D

View file

@ -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):