fix: use quotemeta to join command parts

Co-authored-by: Stéphane Lesimple <speed47_github@speed47.net>
pull/592/head
Jonah 5 months ago committed by Stéphane Lesimple
parent 8ae989ae11
commit dad345c9ce
No known key found for this signature in database
GPG Key ID: 4B4A3289E9D35658

@ -1625,7 +1625,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