mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Merge URI sanitize fix
This commit is contained in:
parent
da42112740
commit
00d8b08341
2 changed files with 15 additions and 1 deletions
|
@ -183,7 +183,8 @@ class Calendar(object):
|
|||
The ``path`` is relative to the storage folder.
|
||||
|
||||
"""
|
||||
attributes = posixpath.normpath(path.strip("/")).split("/")
|
||||
# First do normpath and then strip, to prevent access to FOLDER/../
|
||||
attributes = posixpath.normpath(path).strip("/").split("/")
|
||||
if not attributes:
|
||||
return None
|
||||
if attributes[-1].endswith(".ics"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue