From 08d440717e1c2a018543dee191969ea3bde1b440 Mon Sep 17 00:00:00 2001 From: Jonah Date: Thu, 22 Jan 2026 10:40:12 +0100 Subject: [PATCH] fix: use quotemeta to join command parts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane Lesimple --- bin/shell/osh.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/shell/osh.pl b/bin/shell/osh.pl index df64a7d..28cd6cc 100755 --- a/bin/shell/osh.pl +++ b/bin/shell/osh.pl @@ -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");