mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Turn backslashes into slashes on Windows (fixes #581)
This commit is contained in:
parent
add9da7912
commit
160e296ed1
1 changed files with 2 additions and 1 deletions
|
@ -196,7 +196,8 @@ class Calendar(object):
|
|||
|
||||
"""
|
||||
# First do normpath and then strip, to prevent access to FOLDER/../
|
||||
attributes = posixpath.normpath(path).strip("/").split("/")
|
||||
sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/")
|
||||
attributes = sane_path.split("/")
|
||||
if not attributes:
|
||||
return None
|
||||
if not (os.path.isfile(os.path.join(FOLDER, *attributes)) or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue