Skip to content

Commit

Permalink
The multipart default value of part_limit is 128. We have forms w…
Browse files Browse the repository at this point in the history
…ith more than 128 fields - choosing 1024 as a safe upper limit.
  • Loading branch information
janjaapdriessen committed Dec 17, 2024
1 parent 76f741c commit 5c12cef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

- Replace deprecated multipart argument ``memfile_limit`` with ``spool_limit``

- The multipart default value of ``part_limit`` is 128. We have forms with
more than 128 fields - choosing 1024 as a safe upper limit.

7.1 (2024-09-27)
================
Expand Down
3 changes: 2 additions & 1 deletion src/zope/publisher/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ def processInputs(self):
if env.get('CONTENT_LENGTH') == '':
env.pop('CONTENT_LENGTH')
forms, files = multipart.parse_form_data(
env, charset=self.default_form_charset, spool_limit=0)
env, charset=self.default_form_charset, part_limit=1024,
spool_limit=0)
items.extend(forms.iterallitems())
for key, item in files.iterallitems():
# multipart puts fields in 'files' even if no upload was
Expand Down

0 comments on commit 5c12cef

Please sign in to comment.