--- a/mercurial/subrepo.py Mon Jul 31 16:04:44 2017 -0700
+++ b/mercurial/subrepo.py Mon Jul 31 16:44:17 2017 -0700
@@ -1281,6 +1281,10 @@
# The revision must be specified at the end of the URL to properly
# update to a directory which has since been deleted and recreated.
args.append('%s@%s' % (state[0], state[1]))
+
+ # SEC: check that the ssh url is safe
+ util.checksafessh(state[0])
+
status, err = self._svncommand(args, failok=True)
_sanitize(self.ui, self.wvfs, '.svn')
if not re.search('Checked out revision [0-9]+.', status):