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
]
, 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)