Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
da0ddd62
Commit
da0ddd62
authored
14 years ago
by
Adrian Buehlmann
Browse files
Options
Downloads
Patches
Plain Diff
sshrepo: catch passwords in ssh urls
see also
e4b02eb825b1
parent
22f948c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mercurial/sshrepo.py
+2
-0
2 additions, 0 deletions
mercurial/sshrepo.py
tests/test-ssh.t
+7
-0
7 additions, 0 deletions
tests/test-ssh.t
with
9 additions
and
0 deletions
mercurial/sshrepo.py
+
2
−
0
View file @
da0ddd62
...
...
@@ -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
"
.
"
...
...
This diff is collapsed.
Click to expand it.
tests/test-ssh.t
+
7
−
0
View file @
da0ddd62
...
...
@@ -269,6 +269,13 @@
date:
Thu
Jan
01
00
:
00
:
00
1970
+
0000
summary:
z
passwords
in
ssh
urls
are
not
supported
$
hg
push
ssh:
//us
er:erroneouspwd@dummy
/
remote
abort:
password
in
URL
not
supported
!
[
255
]
$
cd
..
$
cat
dummylog
Got
arguments
1
:
user@dummy
2
:
hg
-
R
nonexistent
serve
--
stdio
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment