Repository navigation
fix(connections): ask again when a trusted link carries a filter - #3314
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
This branch was successfully deployed
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.
Why
A database link (
mysql://,postgresql://, ...) can carry a filter (condition,raw,query, orcolumn,operation,value) that runs on the table it opens. Once a local database was set to Always Allow, such a link connected without asking. The filter alert that followed showed only the first 300 characters of the SQL, so the rest ran unseen. Always Allow also covered a link through an SSH tunnel to127.0.0.1, whatever SSH server it named.Change
Verified
The new
ExternalConnectionGateTestscases for a trusted target with a filter fail with main's trust rule and pass here.ExternalLinkFilterUITestsopens a filteredpostgresql://link and checks the alert shows the filter and offers no Always Allow.Screenshots
Not in this PR
docs/external-api/terminal.mdxstill says Always Allow stops asking. Another PR is moving that page; it needs the filter and tunnel exceptions.quoteIdentifierFromDialect), so atable=value can end the quoting early, and a link without a filter still opens a trusted target without asking.FilterSQLGenerator.escapeStringValuekeys onlikeEscapeStyle), so a backslash can end the literal.ExternalConnectionTrustStorewritesUserDefaults.standard, outside the UI test sandbox, so the trusted path has unit tests only.