Merge pull request #1877 from d14na/patch-1
Add support for tilde `~` in filenames.
This commit is contained in:
commit
055aea58bb
1 changed files with 1 additions and 1 deletions
|
@ -552,7 +552,7 @@ class ContentManager(object):
|
||||||
elif len(relative_path) > 255:
|
elif len(relative_path) > 255:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return re.match("^[a-z\[\]\(\) A-Z0-9_@=\.\+-/]+$", relative_path)
|
return re.match("^[a-z\[\]\(\) A-Z0-9~_@=\.\+-/]+$", relative_path)
|
||||||
|
|
||||||
def sanitizePath(self, inner_path):
|
def sanitizePath(self, inner_path):
|
||||||
return re.sub("[^a-z\[\]\(\) A-Z0-9_@=\.\+-/]", "", inner_path)
|
return re.sub("[^a-z\[\]\(\) A-Z0-9_@=\.\+-/]", "", inner_path)
|
||||||
|
|
Loading…
Reference in a new issue