-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
part_limit=128
is not very generous
#62
Comments
I suspected that the lower default limit may bite someone, but since most of the other limits are per-segment, the number of segments must be limited to protect against malicious requests. 128 segments á 96KB is 12MB already, that's a lot per request. My reasoning was that 128 is very generous for 'normal' forms, and for use cases where you have even more fields, you may want to tweak the limits anyway. So, just increasing the defaults may not be the best idea. The proposed solution with the module level constants also won't work, as python evaluates default values for functions only once. Moving the default-fallbacks into the function body so they are evaluated at runtime (e.g. But there definitely is room for improvement: It is not well documented that And, more importantly, there is a bug or design error that I already noticed, but did not fix yet because it breaks backwards compatibility: Fatal errors that result in wrong or incomplete data always trigger an exception, even in non-strict mode. Reaching limits is a fatal error. The application should be notified that the form could not be parsed completely and some data may be missing. That's the idea, but Tasks:
|
The error handling improvements are now tracked in #63 |
Hi,
part_limit=128
is not very generous, you can easily get to more data/widgets to submit.Sadly
zope.publisher
doesstrict=False
so parsing errors silently succeed. See zopefoundation/zope.publisher#80I'd propose to increase that number, and eventually refactor the limits to module global constants, like this:
That would make life much easier by being able to override defaults by patching.
The text was updated successfully, but these errors were encountered: