From 3c218ecd9c581b83a7e79a4eb1db23ad9a7ed015 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 30 Mar 2022 22:26:02 +0200 Subject: [PATCH] Windows: Block alternate data streams --- radicale/pathutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/radicale/pathutils.py b/radicale/pathutils.py index ff4565e..46306b2 100644 --- a/radicale/pathutils.py +++ b/radicale/pathutils.py @@ -257,6 +257,7 @@ def is_safe_filesystem_path_component(path: str) -> bool: """ return ( bool(path) and not os.path.splitdrive(path)[0] and + (sys.platform != "win32" or ":" not in path) and # Block NTFS-ADS not os.path.split(path)[0] and path not in (os.curdir, os.pardir) and not path.startswith(".") and not path.endswith("~") and is_safe_path_component(path))