-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate VCS command paths with "--" #10483
Conversation
When building a VCS command, there may be ambiguity if a relative path looks like an option, like "-path" or "--path". All of the VCS commands that we use support a bare "--" separator for non-option arguments, which is good practice to apply here. This does not affect the cargo CLI, as it already makes sure to use absolute paths for these calls via `value_of_path()`.
r? @ehuss (rust-highfive has picked a reviewer for you, use r? to override) |
This was raised with the Security Response WG as a vector for command injection, particularly with hg |
This looks Ok to me, we can revert if I missed something. |
📌 Commit 58508e2 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 9 commits in 65c82664263feddc5fe2d424be0993c28d46377a..109bfbd055325ef87a6e7f63d67da7e838f8300b 2022-03-09 02:32:56 +0000 to 2022-03-17 21:43:09 +0000 - Refactor RegistryData::load to handle management of the index cache (rust-lang/cargo#10482) - Separate VCS command paths with "--" (rust-lang/cargo#10483) - Fix panic when artifact target is used for `[target.'cfg(<target>)'.dependencies` (rust-lang/cargo#10433) - Bump [email protected] and [email protected] (rust-lang/cargo#10479) - vendor: Don't allow multiple values for --sync (rust-lang/cargo#10448) - Use types to make clere (credential process || token) (rust-lang/cargo#10471) - Warning on conflicting keys (rust-lang/cargo#10316) - Registry functions return Poll to enable parallel fetching of index data (rust-lang/cargo#10064) - Refine the contributor guide (rust-lang/cargo#10468)
When building a VCS command, there may be ambiguity if a relative path
looks like an option, like "-path" or "--path". All of the VCS commands
that we use support a bare "--" separator for non-option arguments,
which is good practice to apply here.
This does not affect the cargo CLI, as it already makes sure to use
absolute paths for these calls via
value_of_path()
.