mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-15 20:36:55 +00:00
assert sanitized and stripped paths
This commit is contained in:
parent
c08754cf92
commit
5429f5c1a9
19 changed files with 108 additions and 72 deletions
|
@ -25,6 +25,7 @@ from random import getrandbits
|
|||
|
||||
import vobject
|
||||
|
||||
from radicale import pathutils
|
||||
from radicale.item import filter as radicale_filter
|
||||
|
||||
|
||||
|
@ -297,6 +298,8 @@ class Item:
|
|||
raise ValueError("at least one of 'collection_path' or "
|
||||
"'collection' must be set")
|
||||
collection_path = collection.path
|
||||
assert collection_path == pathutils.strip_path(
|
||||
pathutils.sanitize_path(collection_path))
|
||||
self._collection_path = collection_path
|
||||
self.collection = collection
|
||||
self.href = href
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue