Skip to content

Commit

Permalink
Windows: Block alternate data streams
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Mar 30, 2022
1 parent 0baf1dc commit 3c218ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions radicale/pathutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3c218ec

Please sign in to comment.