diff mercurial/url.py @ 12049:e329c250b0ba stable

url: limit expansion to safe auth keys (Issue2328) Mads Kiilerich pointed out that 7c9beccb0533 was too eager since the prefix and password keys may contain $-signs. So this only add the username to the list of keys that are expanded. This also updates the documentation to match.
author Martin Geisler <mg@aragost.com>
date Fri, 13 Aug 2010 10:53:10 +0200
parents 11035185b619
children 5d22e631c365 ca5fd84d62c6
line wrap: on
line diff
--- a/mercurial/url.py	Fri Aug 13 10:10:11 2010 +0200
+++ b/mercurial/url.py	Fri Aug 13 10:53:10 2010 +0200
@@ -156,7 +156,8 @@
                 continue
             group, setting = key.split('.', 1)
             gdict = config.setdefault(group, dict())
-            val = util.expandpath(val)
+            if setting in ('username', 'cert', 'key'):
+                val = util.expandpath(val)
             gdict[setting] = val
 
         # Find the best match