1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-07 18:30:54 +00:00

Merge pull request #1821 from lbt/issue1820

Guard against entries with no vevent_list in the vobject - thank you for this quick fix
This commit is contained in:
Peter Bieringer 2025-07-13 21:01:44 +02:00 committed by GitHub
commit 72002958cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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