addons
addons copied to clipboard
400 error when submitting a block with multiple (10) add-ons
I tried to submit a block with 10 add-ons (~1700 versions). I get to the block details page to select versions, reason etc. When trying to submit on that page, I receive a 400. Blocking the same add-ons worked fine when I use smaller chunks (2-4 add-ons). The add-ons were in different states, some were deleted, others not.
Block request: https://bugzilla.mozilla.org/show_bug.cgi?id=1851475
┆Issue is synchronized with this Jira Task
From the log it's
The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS. {"EnvVersion":"2.0", "Fields":{…}, "Hostname":"..., "Logger":"http_app_addons", "Pid":9, "Severity":3, "Timestamp":1.6939106072952323E18, "Type":"django.security.TooManyFieldsSent"}
which matches the scaling (2-4 works but 10 doesn't) - I guess some of these add-ons have many versions? (Each version that can be blocked is a checkbox; in html each checkbox value is sent as a separate field). DATA_UPLOAD_MAX_NUMBER_FIELDS
defaults to 1000 and afaik we don't override it.
options here include:
- increase
DATA_UPLOAD_MAX_NUMBER_FIELDS
somewhat - though not too high as it's limited for a reason - return a nice error when the number of versions exceeds
DATA_UPLOAD_MAX_NUMBER_FIELDS - some_count_of_other_fields
- stop rendering version checkboxes after the field limit is hit (but then what action should be taken?)
Replicating details from ticket mozilla/addons#9420 here and closing it as a duplicate
When creating a blocklistsubmission
for a lot of versions (3000+) of an add-on, the blocklistsubmission
creation fails and a 400 Bad Request is returned.
Block-filing should go through for add-ons with as many versions as we allow an add-on on AMO to have.
From the error trace (Sentry#4843529265), it looks like we're triggering a TooManyFieldsSent
exception.
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-484