Skip to content

Return 400 for invalid UTF-8 query parameters - #486

Open
ydah wants to merge 1 commit into
masterfrom
fix/invalid-utf8-query-parameter
Open

ydah wants to merge 1 commit into
masterfrom
fix/invalid-utf8-query-parameter

Conversation

@ydah

@ydah ydah commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

OpenAPI 3 query validation can raise ArgumentError when a query value contains invalid UTF-8 bytes and a string pattern is checked. The exception escaped validation, causing a server error for malformed query values.

Convert the exception to Committee::InvalidRequest so the middleware returns a client error, and add regression coverage for a percent-encoded invalid UTF-8 value.

Fixes: #268

@ydah
ydah force-pushed the fix/invalid-utf8-query-parameter branch from 7388950 to 45f632b Compare September 24, 2026 07:20
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.

Failing for garbage(URL encoded) value in query parameter

1 participant