Skip to content

fix(db): drop userinfo from an asset URL that cannot be parsed - #463

Merged
BaaRai merged 2 commits into
BaaRai:mainfrom
Coff0xc:fix/asset-url-userinfo
Nov 22, 2026
Merged

BaaRai merged 2 commits into
BaaRai:mainfrom
Coff0xc:fix/asset-url-userinfo

Conversation

@Coff0xc

@Coff0xc Coff0xc commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

normalizeURL returned the original string when url.Parse failed, so a password in scheme://user:password@ could be stored on the asset. On parse failure the authority userinfo is removed. go test ./db/ -run TestNormalizeURL passes.

normalizeURL returned the raw string when url.Parse failed, so a password in
scheme://user:password@ survived into the asset row. The authority's userinfo
is removed before that fallback.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@BaaRai
BaaRai merged commit 6ef01d4 into BaaRai:main Nov 22, 2026
5 checks passed
@BaaRai

BaaRai commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Thanks @Coff0xc, merged. A URL that url.Parse rejects now loses its scheme://userinfo@ prefix before it is stored, so a password cannot land in the asset row. The merge commit only brings the branch onto main.

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.

3 participants