mercurial/sshpeer.py
changeset 33737 02a745c20121
parent 33701 fda0867cfe03
parent 33659 8cb9e921ef8c
child 33768 82d564d5ac4f
--- a/mercurial/sshpeer.py	Thu Aug 10 14:23:41 2017 -0400
+++ b/mercurial/sshpeer.py	Thu Aug 10 18:55:33 2017 -0400
@@ -124,6 +124,8 @@
         if u.scheme != 'ssh' or not u.host or u.path is None:
             self._abort(error.RepoError(_("couldn't parse location %s") % path))
 
+        util.checksafessh(path)
+
         self.user = u.user
         if u.passwd is not None:
             self._abort(error.RepoError(_("password in URL not supported")))
@@ -134,10 +136,7 @@
         sshcmd = self.ui.config("ui", "ssh")
         remotecmd = self.ui.config("ui", "remotecmd")
 
-        args = util.sshargs(sshcmd,
-                            _serverquote(self.host),
-                            _serverquote(self.user),
-                            _serverquote(self.port))
+        args = util.sshargs(sshcmd, self.host, self.user, self.port)
 
         if create:
             cmd = '%s %s %s' % (sshcmd, args,