fix: use quotemeta to join command parts

Co-authored-by: Stéphane Lesimple <speed47_github@speed47.net>
pull/592/head
Jonah 3 months ago committed by GitHub
parent 30d7be5987
commit 08d440717e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1611,7 +1611,7 @@ else {
push @proxyCommand, '-o', "ConnectTimeout=$timeout" if $timeout;
# Quote arguments that contain spaces and build the command string
my $proxyCommandStr = join(' ', map { /\s/ ? "'$_'" : $_ } @proxyCommand);
my $proxyCommandStr = join(' ', map { quotemeta } @proxyCommand);
push @command, '-o', "ProxyCommand=$proxyCommandStr";
osh_debug("ProxyCommand: $proxyCommandStr");

Loading…
Cancel
Save