bugfix: santize wouldnt allow files starting with . - fixes #3936
This commit is contained in:
parent
18376347ca
commit
4d64b68627
1 changed files with 1 additions and 1 deletions
|
|
@ -449,7 +449,7 @@ class ScmModel(BaseModel):
|
||||||
return tip
|
return tip
|
||||||
|
|
||||||
def _sanitize_path(self, f_path):
|
def _sanitize_path(self, f_path):
|
||||||
if f_path.startswith('/') or f_path.startswith('.') or '../' in f_path:
|
if f_path.startswith('/') or f_path.startswith('./') or '../' in f_path:
|
||||||
raise NonRelativePathError('%s is not an relative path' % f_path)
|
raise NonRelativePathError('%s is not an relative path' % f_path)
|
||||||
if f_path:
|
if f_path:
|
||||||
f_path = os.path.normpath(f_path)
|
f_path = os.path.normpath(f_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue