fix: escape control characters in query parameter values#1807
Draft
daniell-canva wants to merge 1 commit intoClickHouse:mainfrom
Draft
fix: escape control characters in query parameter values#1807daniell-canva wants to merge 1 commit intoClickHouse:mainfrom
daniell-canva wants to merge 1 commit intoClickHouse:mainfrom
Conversation
Named query parameters are deserialized by ClickHouse using deserializeTextEscaped (TSV format). A raw tab byte (0x09) is treated as a TSV field delimiter and causes error 457 (BAD_QUERY_PARAMETER): "isn't parsed completely". Fix encodeFieldDump (native TCP path) to TSV-escape control characters (\t, \n, \r, \\, \0) before sending over the wire. Add escapeQueryParam for the same escaping on the HTTP path, where values are sent as URL query parameters. This matches the behaviour of the official C++ and Python ClickHouse SDKs, which both apply escaping transparently so callers can pass raw Go/Python string values without knowing the wire format. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
draft