Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshrepo.py @ 13464:da0ddd62b9d8 stable
sshrepo: catch passwords in ssh urls
see also e4b02eb825b1
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Wed, 23 Feb 2011 11:42:41 +0100 |
parents | c97ded7b6e79 |
children | 3458c15ab2f0 |
line wrap: on
line diff
--- a/mercurial/sshrepo.py Wed Feb 23 00:25:18 2011 +0100 +++ b/mercurial/sshrepo.py Wed Feb 23 11:42:41 2011 +0100 @@ -29,6 +29,8 @@ self._abort(error.RepoError(_("couldn't parse location %s") % path)) self.user = m.group(2) + if self.user and ':' in self.user: + self._abort(error.RepoError(_("password in URL not supported"))) self.host = m.group(3) self.port = m.group(5) self.path = m.group(7) or "."