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

@@ -200,9 +200,10 @@ def run() -> None:
if args_ns.verify_item:
encoding = configuration.get("encoding", "stock")
max_vevent_rrule_entries = configuration.get("server", "max_vevent_rrule_entries")
logger.info("Item verification start using 'stock' encoding: %s", encoding)
try:
if not item.verify(args_ns.verify_item[0], encoding):
if not item.verify(args_ns.verify_item[0], encoding, max_vevent_rrule_entries):
logger.critical("Item verification failed")
sys.exit(1)
except Exception as e: