Skip to content

Scan both readings of a body that is a form and JSON - #789

Open
iacobdaniel wants to merge 2 commits into
mainfrom
fix/scan-json-body-sent-as-form
Open

iacobdaniel wants to merge 2 commits into
mainfrom
fix/scan-json-body-sent-as-form

Conversation

@iacobdaniel

Copy link
Copy Markdown
Contributor

A body can be valid JSON and also parse as a form, and the app may read it either way. Zen kept only one reading: Django and Quart scanned only the form when JSON was sent with a form content type, and Starlette/FastAPI scanned only the JSON, missing form fields inside it. Both readings are now scanned, including JSON with a BOM or in UTF-16/32. Normal requests are unchanged.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant