Rename path to sane_path

This commit is contained in:
Unrud 2017-06-16 23:11:29 +02:00
parent 5a0d4f7f2f
commit 67669bd690

View File

@ -660,8 +660,8 @@ class Collection(BaseCollection):
else: else:
href = None href = None
path = "/".join(attributes) sane_path = "/".join(attributes)
collection = cls(path) collection = cls(sane_path)
if href: if href:
yield collection.get(href) yield collection.get(href)
@ -679,9 +679,9 @@ class Collection(BaseCollection):
if not is_safe_filesystem_path_component(href): if not is_safe_filesystem_path_component(href):
if not href.startswith(".Radicale"): if not href.startswith(".Radicale"):
cls.logger.debug("Skipping collection %r in %r", href, cls.logger.debug("Skipping collection %r in %r", href,
path) sane_path)
continue continue
child_path = posixpath.join(path, href) child_path = posixpath.join(sane_path, href)
yield cls(child_path) yield cls(child_path)
@classmethod @classmethod