Bug 2754 - password of ssh URLs not replaced with ***, breaks test-ssh.t
Summary: password of ssh URLs not replaced with ***, breaks test-ssh.t
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: urgent bug
Assignee: Matt Mackall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 03:29 UTC by Thomas Arendsen Hein
Modified: 2011-04-06 12:09 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arendsen Hein 2011-04-06 03:29 UTC
Between Mercurial 1.8.1 and 1.8.2 this change was included:

changeset:   13693:adf3c4401c5d
branch:      stable
user:        Miloš Hadžić <milos.hadzic@gmail.com>
date:        Thu Mar 17 22:55:02 2011 +0100
summary:     push/outgoing: print remote target path even if there's an
error (issue2561)

With python 2.5 and 2.4 (not with 2.6) it produces a failed test:

--- /home/thomas/hg/repos/tah/tests/test-ssh.t 
+++ /home/thomas/hg/repos/tah/tests/test-ssh.t.err 
@@ -266,7 +266,7 @@
 passwords in ssh urls are not supported
 
   $ hg push ssh://user:erroneouspwd@dummy/remote
-  pushing to ssh://user:***@dummy/remote
+  pushing to ssh://user:erroneouspwd@dummy/remote
   abort: password in URL not supported!
   [255]

The failed test only occurs in the stable branch, not with default
(tested with 1aea86673dee)

Since the problem only affects ssh:// (replacing the password with *** works
with http and https, even if I provide an invalid host name) and passwords
in URLs are not supported for ssh, I do not consider this critical.
Comment 1 kiilerix 2011-04-06 03:48 UTC
Is this really urgent and worth fixing on the stable branch? Hiding of ssh
passwords never worked - Miloš just made it a bit more visible. It is an
error in the first place to specify the password this way, so this error
message should only be hit the one and only time a user tries to do this.

Anyway: This could be another reason for backporting Brodies url module and
using it in a few places. (As you said on Issue2556 ...)
Comment 2 Thomas Arendsen Hein 2011-04-06 07:05 UTC
The urgent part is that a test is broken.
While a broken test is no big problem in itself, it leads to ignoring broken
tests which leads to missing important problems.

Adjusted title to reflect this.
Comment 3 kiilerix 2011-04-06 07:13 UTC
Agreed.

Would it be fine with you to just add a (glob) in stable?
Comment 4 Thomas Arendsen Hein 2011-04-06 07:50 UTC
* Mads Kiilerich <bugs@mercurial.selenic.com> [20110406 15:13]:
> Would it be fine with you to just add a (glob) in stable?

fine with me.
Comment 5 Matt Mackall 2011-04-06 12:09 UTC
I've got a fix for this in my tree already.
Comment 6 Bugzilla 2012-05-12 09:19 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:19 EDT  ---

This bug was previously known as _bug_ 2754 at http://mercurial.selenic.com/bts/issue2754