﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20872	Bad error message if INITIAL_FORMS/TOTAL_FORMS > MAX_NUM_FORMS	Russell Keith-Magee	mburst	"Formset handling currently enforces a MAX_NUM_FORMS check on incoming form data. However, there is no checking or validation that MAX_NUM_FORMS is actually equal to or greater than INITIAL_FORMS/TOTAL_FORMS. 

As a result, it's possible to construct and display a formset, but then have that formset fail (with a ""list index out of range error"") on form submission.

This manifested for me as the following: A model in the admin with inlines; the inline was filled with 2023 inline objects, and the default MAX_NUM_FORMS (1000 was in use. The page takes a long time to load, but it *does* load; when you hit submit, you get the ""list index out of range"" error as a 500 page, with no suggestion of the underlying problem.

I haven't tested, but AFAICT, the same problem will manifest with a lot less data if you set MAX_NUM_FORMS to a lower value.
"	Bug	closed	Forms	1.5	Normal	fixed			Accepted	0	0	0	0	0	0
