1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

add test_report_with_max_occur and fix vevent count issue found

Signed-off-by: David Greaves <david@dgreaves.com>
This commit is contained in:
David Greaves 2025-07-08 16:09:28 +01:00
parent 3f4f405554
commit 83a7853405
3 changed files with 117 additions and 2 deletions

View file

@ -310,7 +310,7 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element],
found_props.append(expanded_element)
else:
found_props.append(element)
n_vevents += 1
n_vevents += len(item.vobject_item.vevent_list)
# Avoid DoS with too many events
if max_occurrence and n_vevents > max_occurrence:
raise ValueError("REPORT occurrences limit of {} hit"