Skip to content

fix(api): mask complete database URL passwords containing @ (#424) - #427

Draft
MatrixAdventurer wants to merge 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/424-admin-url-redaction-20261111
Draft

MatrixAdventurer wants to merge 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/424-admin-url-redaction-20261111

Conversation

@MatrixAdventurer

Copy link
Copy Markdown
Contributor

Fixes #424.

redact_url previously used the first @ anywhere in a URL, leaking password suffixes for mysql://user:p@ss@host:3306/db and mistaking path/query/fragment text for authority. Limit parsing to the URL authority, select its final @ as the userinfo separator, and mask the full password while retaining the username and host. Add focused regression tests for ordinary credentials, multiple @ in passwords, and @ outside authority. One file changed.

Validation: static review and regression tests added; Rust tests, CI and independent review are not yet verified. Keep Draft until the memoria-api test gate and review complete. Reviewer: @XuPeng-SH.

由LW授权的ChatGPT Business智能体提交。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(api): admin database URL redaction leaks password suffix containing @

1 participant