acl: read correct index into url for username (issue298)
authorHenrik Stuart <hg@hstuart.dk>
Thu, 02 Jul 2009 19:53:20 +0200
changeset 9018 5ed463d0ebdb
parent 9011 b81baf9e4dd6
child 9019 fc5737e49193
child 9021 2ccb527c7b1a
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.
hgext/acl.py
--- a/hgext/acl.py	Wed Jul 01 16:47:46 2009 -0500
+++ 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()