From 6cf5ca0638dbde8a8e67c41d0ef4a5cf32182921 Mon Sep 17 00:00:00 2001 From: Quirin Pamp Date: Wed, 16 Oct 2024 16:26:12 +0200 Subject: [PATCH] fixup! fixup! Handle URL params for AptRepoFiles --- src/subscription_manager/repofile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/subscription_manager/repofile.py b/src/subscription_manager/repofile.py index 854d9c1d53..223a7c9cd5 100644 --- a/src/subscription_manager/repofile.py +++ b/src/subscription_manager/repofile.py @@ -463,12 +463,11 @@ def fix_content(self, content): # Luckily apt ignores all Fields it does not recognize parsed_url = urlparse(unquote(content["baseurl"])) baseurl = parsed_url._replace(query="").geturl() - url_res = re.match(r"^https?://(?P.*)$", baseurl) ent_res = re.match(r"^/etc/pki/entitlement/(?P.*).pem$", content["sslclientcert"]) - if url_res and ent_res: - location = url_res.group("location") + if parsed_url.scheme in ['http', 'https'] and ent_res: entitlement = ent_res.group("entitlement") - baseurl = "katello://{}@{}".format(entitlement, location) + netloc = entitlement + '@' + parsed_url.netloc + baseurl = parsed_url._replace(query="",scheme="katello",netloc=netloc).geturl() query = parse_qs(parsed_url.query) if "rel" in query and "comp" in query: