fix yum proxy regex (closes #47797) (#47800)

* Modify yum/tasks/proxy.yml to usernames that expose regex bug

* Fix bad regex backref/interpolation w/yum proxy username

A yum proxy username that begins with a number was being
interpolated as part of the backref, resulting in an error:
"sre_constants.error: invalid group reference"

Closes #47797
This commit is contained in:
Paul Harvey 2018-10-31 02:35:37 +11:00 committed by Martin Krizek
commit cd75074fc5
2 changed files with 9 additions and 9 deletions

View file

@ -710,7 +710,7 @@ class YumModule(YumDnf):
for item in scheme:
os.environ[item + "_proxy"] = re.sub(
r"(http://)",
r"\1" + namepass, proxy_url
r"\g<1>" + namepass, proxy_url
)
yield
except yum.Errors.YumBaseError: