fix over-shell-escape

Seems I had one time too many.
This commit is contained in:
Joey Hess 2017-03-17 17:06:14 -04:00
parent faecd73f32
commit c9578be5b2
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -47,22 +47,16 @@ gitSsh host mp cmd = do
, Param c , Param c
] ]
, gitps , 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 Nothing -> do
gs <- getEnv gitSshEnv gs <- getEnv gitSshEnv
case gs of case gs of
Just c -> ret c [ gitps, [Param cmd]] Just c -> ret c [gitps]
Nothing -> return Nothing Nothing -> return Nothing
where where
-- git passes exactly these parameters, followed by another -- git passes exactly these parameters
-- parameter containing the remote command.
gitps = map Param $ case mp of gitps = map Param $ case mp of
Nothing -> [host] Nothing -> [host, cmd]
Just p -> [host, "-p", show p] Just p -> [host, "-p", show p, cmd]
ret c ll = return $ Just (c, concat ll) ret c ll = return $ Just (c, concat ll)