Repository navigation
fix(databend): name only BendSQL's own parameters in the paste notice - #1706
Merged
Merged
Conversation
The "Not applied" warning of a Databend paste named every query key the URL parser found. An unencoded "&" inside a value, or a bare token with no "name=", became a key of its own, so `?password=SECRET&TAIL` drew TAIL in the dialog's banner.
The notice now names only the parameters BendSQL reads by name (role, tenant, login and the rest of from_dsn's list) when written as name=value, and counts every other one ("Not applied: role and 1 other parameter."), so nothing taken from a value reaches it. The provider doc says which are named and which are counted.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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.



Pasting a Databend DSN showed a "Not applied" warning listing every query key the URL parser found. If a value held an unencoded "&", or the query had a bare token with no "name=", part of that value showed up as a parameter name in the banner. For example,
?password=SECRET&TAILshowed TAIL.The notice now names a parameter only when it is written as name=value and the name is one BendSQL reads by name (role, tenant, login and the rest of from_dsn's list). Every other parameter is counted instead: "Not applied: role and 1 other parameter.", "Not applied: 2 parameters." Session settings such as enable_dphyp are now counted too, not named.
Tests pin both reported inputs in the parser and in the form hook, and check that no text from a value reaches the warning. docs/providers/databend.md section 4.1 now says which parameters are named and which are counted.
Checks: the full local gate set passed (format, lint, typecheck, knip, the drift guards, every test file at 100% line coverage, build,
build:lib,attw).A browser check runs before this leaves draft.
No separate review agents ran on this branch.