[PATCH] fix bug in https url handling

Jonathan S. Shapiro shap at eros-os.com
Thu Nov 8 09:08:05 CST 2007


What happens on Fedora 6 and later?

I ask because Ubuntu and CentOS are based on later versions of
everything, and presumably later versions of Apache. Fedora 3 was
retired long ago. If this bug is specific to Fedora 3 I'm not convinced
that this workaround should go in.

shap


On Thu, 2007-11-08 at 15:56 +0100, Dominique Quatravaux wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Here are my observations.  I tried the following on several machines:
> 
>   hg up -r 0.9.5
>   make clean
>   make local
>   ./hg clone https://domq:domq@myrepo/path/
> 
> OK means that the cloning proceeds without further interactive
> questions; ASK means that the username and password gets asked again.
> 
> OK on: Ubuntu Gutsy i386, Python 2.5.1
> ASK on: Fedora Core 3 i386, Python 2.3.4
> OK on: CentOS 4 i386, Python 2.4.3
> 
> On Fedora Core 3, applying the suggested one-line patch to
> mercurial/httprepo.py turns ASK into OK.
> 
> How about storing the password under *both* URLs?
> 
>          if user:
>              ui.debug(_('http auth: user %s, password %s\n') %
>                       (user, passwd and '*' * len(passwd) or 'not set'))
>              passmgr.add_password(None, self._url, user, passwd or '')
>              passmgr.add_password(None, host, user, passwd or '')
>  
>          handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
>                           httpdigestauthhandler(passmgr)))
> 
> 
> Probably could use some fairly trivial refactoring :-) but you get the
> idea.
> 
> - --
> << Tout n'y est pas parfait, mais on y honore certainement les
> jardiniers >>
> 
>             Dominique Quatravaux <dominique at quatravaux.org>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iQCVAwUBRzMjhPTYH7KfeIIFAQLSDwP/Y4C7bUQAhmUbwGWq/6LLJD0NJdgkvUo5
> ZTVqFOTW9+stHnuBYKKYyzX5BinmcSl0gf16pVuO5fxlM1aGX6Lkr77t2gDe7t6J
> s6f0hTPyKCPylmwtQdn58EeQO0ErhPmNjhK6yFa3d04PTQRQjntOnEBarY0jEg41
> wJ6o35paGSI=
> =NRWu
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
-- 
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC
www.coyotos.org, www.eros-os.org



More information about the Mercurial-devel mailing list