mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add an upper cap on subevent creation to prevent infinite loops
This commit is contained in:
@@ -872,6 +872,9 @@ class SubEventBulkCreate(SubEventEditorMixin, EventPermissionRequiredMixin, Asyn
|
||||
)
|
||||
subevents.append(se)
|
||||
|
||||
if len(subevents) > 100_000:
|
||||
raise ValidationError(_('Please do not create more than 100.000 dates at once.'))
|
||||
|
||||
for i, se in enumerate(subevents):
|
||||
se.save(clear_cache=False)
|
||||
if i % 100 == 0:
|
||||
|
||||
Reference in New Issue
Block a user