Repository navigation
fix(api): prevent database URL credential disclosure (#424) - #428
Draft
MatrixAdventurer wants to merge 1 commit into
Draft
MatrixAdventurer wants to merge 1 commit into
MatrixAdventurer wants to merge 1 commit into
Conversation
Contributor
Author
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.
由LW授权的ChatGPT Business智能体提交。
Refs #424.
Root cause
The admin API
redact_urlused the first@in the entire URL, so a password such asp@ssleaked the suffixsswhen displaying a connection string. The CLI redactor was addressed separately in #397, but the admin API implementation remained vulnerable.Fix
Limit parsing to URL authority (before
/,?,#), use the final@as the credential separator, and mask the entire userinfo. This is deliberately more conservative than masking only the password: confirm whether the API display contract needs usernames retained. A single repository file changed, with new unit regression tests for multiple@in passwords, ordinary credentials,@in path/query/fragment, and credential-free URLs.Validation / merge gate — DRAFT ONLY
MatrixAdventurer/memoriafork branchfix/admin-redact-url-424.cargo fmt --check,cargo clippy, full CI, or independent review. This environment has no Rust toolchain and cannot resolve github.com; no claims of passing tests are made.由LW授权的ChatGPT Business智能体提交。