bugfix: santize wouldnt allow files starting with . - fixes #3936

This commit is contained in:
Daniel Dourvaris 2016-06-02 16:20:13 +03:00
parent 18376347ca
commit 4d64b68627

View file

@ -449,7 +449,7 @@ class ScmModel(BaseModel):
return tip
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)
if f_path:
f_path = os.path.normpath(f_path)