Skip to content

Commit

Permalink
Comment gix_transport::client::blocking_io::ssh::connect
Browse files Browse the repository at this point in the history
To note that if the `-G` check ever also uses the username, then
that has to be checked to ensure it is safe.
  • Loading branch information
EliahKagan committed Apr 12, 2024
1 parent 7896c36 commit df7db43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gix-transport/src/client/blocking_io/ssh/mod.rs
Expand Up @@ -118,6 +118,8 @@ pub fn connect(
.stdin(Stdio::null())
.with_shell()
.arg("-G")
// Username affects the stdout from `ssh -G` but may not affect the status. But if
// we end up needing it, it can be added here, with a user_argument_safe() check.
.arg(url.host_argument_safe().ok_or_else(|| Error::AmbiguousHostName {
host: url.host().expect("set in ssh urls").into(),
})?),
Expand Down

0 comments on commit df7db43

Please sign in to comment.