Add: [system] max_vevent_rrule_entries option to catch DoS by problematic RRULE early enough

This commit is contained in:
Peter Bieringer
2026-08-01 18:54:31 +02:00
parent 4a4e571cce
commit b044addc53
11 changed files with 36 additions and 6 deletions

View File

@@ -106,6 +106,7 @@ class StorageBase(storage.BaseStorage):
"logging", "storage_cache_actions_on_debug")
self._max_resource_size = configuration.get(
"server", "max_resource_size")
self._max_vevent_rrule_entries = configuration.get("server", "max_vevent_rrule_entries")
def _get_collection_root_folder(self) -> str:
return os.path.join(self._filesystem_folder, "collection-root")

View File

@@ -124,7 +124,7 @@ class CollectionPartGet(CollectionPartCache, CollectionPartLock,
vobject_items = radicale_item.read_components(
raw_text.decode(self._encoding))
radicale_item.check_and_sanitize_items(
vobject_items, tag=self.tag)
vobject_items, tag=self.tag, max_vevent_rrule_entries=self._storage._max_vevent_rrule_entries)
vobject_item, = vobject_items
temp_item = radicale_item.Item(
collection=self, vobject_item=vobject_item)