From df7db430eb49449e242fe8af5596d011c156e801 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Fri, 12 Apr 2024 07:58:58 +0000 Subject: [PATCH] Comment gix_transport::client::blocking_io::ssh::connect To note that if the `-G` check ever also uses the username, then that has to be checked to ensure it is safe. --- gix-transport/src/client/blocking_io/ssh/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gix-transport/src/client/blocking_io/ssh/mod.rs b/gix-transport/src/client/blocking_io/ssh/mod.rs index 00e06582d7..7d179951f6 100644 --- a/gix-transport/src/client/blocking_io/ssh/mod.rs +++ b/gix-transport/src/client/blocking_io/ssh/mod.rs @@ -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(), })?),