[PATCH] acl: read correct index into url for username (issue298)

Henrik Stuart hg at hstuart.dk
Thu Jul 2 12:55:32 CDT 2009


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1246557200 -7200
# Node ID 3ad2640c6e0df56ad26d608b8bfa4617ff569447
# Parent  c24c9ce0cdcf74e8377d4e0c5e177682f3d76c32
acl: read correct index into url for username (issue298)

The index was inadvertedly off-by-one causing the username to be the
remote host rather than the remote user when hosted in a http(s)
session.

diff -r c24c9ce0cdcf -r 3ad2640c6e0d hgext/acl.py
--- a/hgext/acl.py	Sat Jun 27 13:09:11 2009 +0200
+++ b/hgext/acl.py	Thu Jul 02 19:53:20 2009 +0200
@@ -84,7 +84,7 @@
     if source == 'serve' and 'url' in kwargs:
         url = kwargs['url'].split(':')
         if url[0] == 'remote' and url[1].startswith('http'):
-            user = urllib.unquote(url[2])
+            user = urllib.unquote(url[3])
 
     if user is None:
         user = getpass.getuser()


More information about the Mercurial-devel mailing list