From a4a6a62643ec201dacc69c7a8d451af408667c45 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 4 Sep 2016 12:53:07 +0200 Subject: [PATCH] Duplicate code: Use is_safe_path_component --- radicale/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/storage.py b/radicale/storage.py index 5885f6e..78d54b9 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -125,7 +125,7 @@ def sanitize_path(path): path = posixpath.normpath(path) new_path = "/" for part in path.split("/"): - if not part or part in (".", ".."): + if not is_safe_path_component(part): continue new_path = posixpath.join(new_path, part) trailing_slash = "" if new_path.endswith("/") else trailing_slash