commit: 90b7d3b00d5a5eb9b732fb8b5bf0870eb89ab422 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sun Mar 22 21:42:42 2020 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Mar 23 01:16:09 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=90b7d3b0
_hide_url_passwd: replace all occurrences (bug 713726) Adjust the regular expression to avoid overly-greedy .+ groups, so that is will properly replace all occurrences, as necessary for the purposes of bug 713726 since PORTAGE_BINHOST may contain multiple values. Bug: https://bugs.gentoo.org/713726 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/package/ebuild/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index f7984130f..28e7caf53 100644 --- a/lib/portage/package/ebuild/fetch.py +++ b/lib/portage/package/ebuild/fetch.py @@ -67,7 +67,7 @@ _userpriv_spawn_kwargs = ( ) def _hide_url_passwd(url): - return re.sub(r'//(.+):.+@(.+)', r'//\1:*password*@\2', url) + return re.sub(r'//([^:\s]+):[^@\s]+@', r'//\1:*password*@', url) def _want_userfetch(settings):