Changeset - 3f0fe158dc0c
[Not reviewed]
beta
0 1 0
philip.j@hostdime.com - 13 years ago 2012-11-29 22:09:42
philip.j@hostdime.com
Grafted from: 9feb69b473e9
Added uri encoding to the username so that usernames with '@' in them (such as email address/users from LDAP) will
not have to replace the first '@' with %40 in order to clone
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/summary.py
Show inline comments
 
@@ -88,25 +88,25 @@ class SummaryController(BaseRepoControll
 
        else:
 
            username = str(self.rhodecode_user.username)
 
            password = '@'
 

	
 
        parsed_url = urlparse(url.current(qualified=True))
 

	
 
        default_clone_uri = '{scheme}://{user}{pass}{netloc}{path}'
 

	
 
        uri_tmpl = config.get('clone_uri', default_clone_uri)
 
        uri_tmpl = uri_tmpl.replace('{', '%(').replace('}', ')s')
 
        decoded_path = safe_unicode(urllib.unquote(parsed_url.path))
 
        uri_dict = {
 
           'user': username,
 
           'user': urllib.quote(username),
 
           'pass': password,
 
           'scheme': parsed_url.scheme,
 
           'netloc': parsed_url.netloc,
 
           'path': decoded_path
 
        }
 

	
 
        uri = uri_tmpl % uri_dict
 
        # generate another clone url by id
 
        uri_dict.update(
 
         {'path': decoded_path.replace(repo_name, '_%s' % c.dbrepo.repo_id)}
 
        )
 
        uri_id = uri_tmpl % uri_dict
0 comments (0 inline, 0 general)