Revert a strange commit (let's say I was tired)
This commit is contained in:
parent
69e2eb0908
commit
040d3b87a8
@ -210,7 +210,7 @@ class Collection(object):
|
|||||||
# First do normpath and then strip, to prevent access to FOLDER/../
|
# First do normpath and then strip, to prevent access to FOLDER/../
|
||||||
sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/")
|
sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/")
|
||||||
attributes = sane_path.split("/")
|
attributes = sane_path.split("/")
|
||||||
if not sane_path or not attributes:
|
if not attributes:
|
||||||
return []
|
return []
|
||||||
if not (cls.is_leaf("/".join(attributes)) or path.endswith("/")):
|
if not (cls.is_leaf("/".join(attributes)) or path.endswith("/")):
|
||||||
attributes.pop()
|
attributes.pop()
|
||||||
|
Loading…
Reference in New Issue
Block a user