pallets / werkzeug

The comprehensive WSGI web application library.
https://werkzeug.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
6.63k stars 1.73k forks source link

restore invalid bytes behavior for form parser #2938

Closed davidism closed 3 weeks ago

davidism commented 3 weeks ago

2694 removed max part limit from application/x-www-form-urlencoded parsing, previously added in #2620. However, it left the except ValueError: raise RequestEntityTooLarge. If body.decode() raised a UnicodeError, it resulted in a 413 error rather than being silently ignored. This restores that previous behavior.

fixes #2930