Skip to content

Fix: reject invalid UTF-8 with 422 instead of 500 - #49

Merged
asubbarao merged 2 commits into
mainfrom
fix/utf8-param-validation-422
Oct 17, 2026
Merged

asubbarao merged 2 commits into
mainfrom
fix/utf8-param-validation-422

Conversation

@asubbarao

Copy link
Copy Markdown
Owner

quackapi bug-hunt 2026-10-15: param validation rejects invalid UTF-8 with 422 instead of 500. Draft PR to run CI.

DuckDB's Value(string) throws Invalid Input on invalid UTF-8.
Three unprotected construction sites in HandleRequest's binding
loop (BindParamValue, the number-like probe, the PARAM constraint
check) let that throw escape as a 500 with a serialized-exception
body -- and on POST /mcp it broke the JSON-RPC envelope with a
raw HTTP 500. Probe once per parameter right after `raw` is
assigned so malformed bytes become a 422 on the parameter that
carried them, covering query/form/header/cookie/body locations.
@asubbarao
asubbarao marked this pull request as ready for review October 17, 2026 04:01
@asubbarao
asubbarao merged commit c8d006b into main Oct 17, 2026
11 checks passed
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