# HG changeset patch # User Marcin Kuzminski # Date 2016-12-02 12:04:09 # Node ID 7eb14a12d0eb4a35c6db0a9cfa7f2e5e556b3d82 # Parent 7666075ec3325e065073fa0429fe11e399cbc540 obfuscation: don't always set passwd to obfuscated text. In case there's no credentials we simply don't set them. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -169,7 +169,7 @@ class GitRemote(object): def check_url(self, url, config): url_obj = url_parser(url) test_uri, _ = url_obj.authinfo() - url_obj.passwd = '*****' + url_obj.passwd = '*****' if url_obj.passwd else url_obj.passwd url_obj.query = obfuscate_qs(url_obj.query) cleaned_uri = str(url_obj) log.info("Checking URL for remote cloning/import: %s", cleaned_uri) diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -328,7 +328,7 @@ class HgRemote(object): handlers = [] url_obj = url_parser(url) test_uri, authinfo = url_obj.authinfo() - url_obj.passwd = '*****' + url_obj.passwd = '*****' if url_obj.passwd else url_obj.passwd url_obj.query = obfuscate_qs(url_obj.query) cleaned_uri = str(url_obj) @@ -444,8 +444,9 @@ class HgRemote(object): result = [] for i, annotate_data in enumerate(fctx.annotate()): ln_no = i + 1 - sha = hex(annotate_data[0].node()) - result.append((ln_no, sha, annotate_data[1])) + node_info, content = annotate_data + sha = hex(node_info[0].node()) + result.append((ln_no, sha, content)) return result @reraise_safe_exceptions