From 3930d7a048fbd25fb7d058a08786d532e69927c2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 Mar 2017 17:06:14 -0400 Subject: fix over-shell-escape Seems I had one time too many. --- Git/Ssh.hs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Git/Ssh.hs b/Git/Ssh.hs index b5d90d7a2..79065f2b4 100644 --- a/Git/Ssh.hs +++ b/Git/Ssh.hs @@ -47,22 +47,16 @@ gitSsh host mp cmd = do , Param c ] , gitps - -- cmd is already shell escaped - -- for the remote side, but needs to be - -- shell-escaped once more since it's - -- passed through the local shell. - , [ Param $ shellEscape $ cmd ] ] - | otherwise -> ret c [ gitps, [Param cmd]] + | otherwise -> ret c [gitps] Nothing -> do gs <- getEnv gitSshEnv case gs of - Just c -> ret c [ gitps, [Param cmd]] + Just c -> ret c [gitps] Nothing -> return Nothing where - -- git passes exactly these parameters, followed by another - -- parameter containing the remote command. + -- git passes exactly these parameters gitps = map Param $ case mp of - Nothing -> [host] - Just p -> [host, "-p", show p] + Nothing -> [host, cmd] + Just p -> [host, "-p", show p, cmd] ret c ll = return $ Just (c, concat ll) -- cgit v1.2.3