-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Send 400 on missing boundary #1588
Copy link
Copy link
Closed
Labels
clean upRefinement to existing functionalityRefinement to existing functionalitygood first issueGood for beginnersGood for beginnershelp wantedFeel free to helpFeel free to help
Metadata
Metadata
Assignees
Labels
clean upRefinement to existing functionalityRefinement to existing functionalitygood first issueGood for beginnersGood for beginnershelp wantedFeel free to helpFeel free to help
I did some research about this PR, and to understand if the issue was reasonable.
Here's what I've found out:
ValueErrorwhen theboundaryis not found: https://github.com/pallets/werkzeug/blob/dae7e0d06651e54a74f04e1cf24d806c4e2e9be9/src/werkzeug/formparser.py#L270-L291boundaryis valid with https://github.com/python/cpython/blob/27ee43183437c473725eba00def0ea7647688926/Lib/cgi.py#L991-L997On Starlette, we raise
KeyErrorwith "boundary key missing". Although this PR follows the issue that was raised, and it's actually an improvement, I think we should follow Django's lead, and also create a 400 response on this case.Originally posted by @Kludex in #1544 (comment)