fix: preserve colons in URL usernames - #2828
Merged
Merged
Conversation
Sebastian Thiel (Byron)
force-pushed
the
user-colon-tobstring
branch
from
July 24, 2026 14:02
8fa4fe6 to
a1f661c
Compare
Sebastian Thiel (Byron)
marked this pull request as ready for review
July 24, 2026 14:04
Sebastian Thiel (Byron)
enabled auto-merge
July 24, 2026 14:04
<!-- agent --> Percent-decoded colons in usernames were serialized literally, causing the parser to reinterpret the suffix as a password. The regression test shows that an HTTP username containing a colon did not survive serialization and reparsing. Encode colons specifically in the username while retaining the existing userinfo encoding for passwords, where colons are data. Git baseline: credential.c at a23bace963d508bd96983cc637131392d3face18 uses the first literal colon as the user/password boundary and percent-decodes the resulting fields. Co-authored-by: GPT 5.6 <codex@openai.com>
Sebastian Thiel (Byron)
force-pushed
the
user-colon-tobstring
branch
from
July 24, 2026 14:10
a1f661c to
4a6834d
Compare
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.
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by
Codex GPT-5.Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Fixes #2827
Summary
:when serializing decoded usernames so it cannot become the username/password delimiterGit baseline
Git
a23bace963d508bd96983cc637131392d3face18treats the first literal colon in URL userinfo as the username/password boundary and percent-decodes the separated fields (credential.c).Validation
cargo test -p gix-url colon_in_username_roundtripscargo test -p gix-urlcargo clippy -p gix-url --all-targets -- -D warningsgit diff --checkcodex review --commit 8fa4fe693e5fd93691e33d0e6adbeadc14386023