note about ssh hostname sanitization

This commit is contained in:
Joey Hess 2019-08-02 10:40:55 -04:00
parent 1cef791cf3
commit 2533acc7a2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -287,6 +287,10 @@ data Endpoint
--
-- May generate console output, including error messages from ssh or the
-- remote server, and ssh password prompting.
--
-- Note that this does not sanitize the hostname. It is the responsibility
-- of the caller to avoid calling this with a value that ssh will
-- interpert as an option, such as "-oProxyCommand="
sshDiscoverEndpoint :: HostUser -> FilePath -> TransferRequestOperation -> IO (Maybe Endpoint)
sshDiscoverEndpoint hostuser remotepath tro =
(try (readProcess "ssh" ps "") :: IO (Either IOError String)) >>= \case