Repository navigation
feat(favorites): never store a password in a saved query - #615
Merged
Merged
Conversation
A favorite carrying `IDENTIFIED BY 's3cret'` was written to storage as typed, walking past the keyring the same way history did before #587. A favorite is kept deliberately and for longer than a history entry, so the case is stronger here, not weaker (#339). Credentials are stripped on the way in — on save and on edit, since an edit can introduce one the original did not have. The sidebar marks such a favorite and says why it will not run as written. Only credentials. The issue asked for the same value-redaction setting history has, and I have deliberately not extended it: a favorite exists to be run again, and one whose values have been blanked is not a saved query, it is a broken one. History can afford that trade because a history entry is a record; a favorite is a tool. If a value should not be in a favorite, it should not be in the favorite. That is a judgement rather than an oversight, so it is worth overruling if you disagree — the plumbing is one call away, `redactLiterals` already exists, and the store has a single scrub() to change. Closes #339 Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Closes #339.
A favorite carrying
IDENTIFIED BY 's3cret'was written to storage as typed, walking past the keyring the same way history did before #587. A favorite is kept deliberately and for longer than a history entry, so the case is stronger here, not weaker.Credentials are stripped on the way in — on save and on edit, since an edit can introduce one the original didn't have. The sidebar marks such a favorite and says why it won't run as written.
Only credentials, deliberately
The issue asked for the same value-redaction setting history has (#330). I've deliberately not extended it.
A favorite exists to be run again, and one whose values have been blanked isn't a saved query — it's a broken one. History can afford that trade because a history entry is a record; a favorite is a tool. If a value shouldn't be in a favorite, it shouldn't be in the favorite.
That's a judgement, not an oversight, so overrule it if you disagree:
redactLiteralsalready exists and the store has a singlescrub()to change.Verification
8 new tests (5 store, 3 sidebar). Unit 2054, browser 297, 0 lint errors.