Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest multipart stops parsing after 128 parts #80

Open
agroszer opened this issue Oct 22, 2024 · 2 comments
Open

latest multipart stops parsing after 128 parts #80

agroszer opened this issue Oct 22, 2024 · 2 comments

Comments

@agroszer
Copy link
Contributor

multipart commit defnull/multipart@aa9b820 adds a limit on parsed parts of 128

multipart 1.1.0 definitely has this

That means forms having about 128 widgets (give or take empty-markers and hidden controls) get silently cut at the 128 limit. Good or not submit buttons are usually last so processing does not even get to the button action.

processInputs calls multipart.parse_form_data with strict=False and without part_limit.

I might see a reason behind setting a default part_limit=128 and ignoring parse errors, but not sure whether that's something good or not.

@defnull
Copy link

defnull commented Oct 23, 2024

A short term solution would be to pass a higher part_limit to parse_form_data() and maybe re-evaluate the other limits too. In the meantime I'll work on multipart to have better documentation for those limits, and add a way to receive errors from parse_form_data() even in non-strict mode.

@agroszer
Copy link
Contributor Author

We might need to define (or allow app code) to define the limits. We have some highly complex generated z3c.forms which can have loads of widgets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants