Vendoring a git dependency with +
in branch name is broken
#14584
Labels
A-git
Area: anything dealing with git
A-lockfile
Area: Cargo.lock issues
C-bug
Category: bug
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
In the example given below, this is what
cargo check says
:Expected behavior: no issue with vendoring this dependency.
This was also reported in ipetkov/crane#549 but seems to actually be a bug in cargo.
Steps
Possible Solution(s)
Percent-encode URLs more strictly (see notes)
Notes
This is what
cargo update
says in the example given:Looks like
cargo
treats+
in the URL as a space symbol encoded following RFC 1866, notices that the actual branch name has a plus and not a space, but does not encode the+
symbol as recommended by RFC 3986.Version
cargo 1.82.0-nightly (257b72b 2024-07-30)
release: 1.82.0-nightly
commit-hash: 257b72b
commit-date: 2024-07-30
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.1 (sys:0.4.73+curl-8.8.0 system ssl:OpenSSL/3.0.14)
ssl: OpenSSL 3.3.1 4 Jun 2024
os: Mac OS 14.4.1 [64-bit]
The text was updated successfully, but these errors were encountered: