From ef9fb1b1d1b7abeb4eacde237ea55d042331c6e6 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 23 May 2017 09:45:20 -0500 Subject: [PATCH] Do not strip port for insecure check When checking if a registry is insecure, we should not be stripping the port from the registry name. --- Atomic/backends/_docker.py | 2 +- Atomic/push.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Atomic/backends/_docker.py b/Atomic/backends/_docker.py index 04659eed..bb00ad08 100644 --- a/Atomic/backends/_docker.py +++ b/Atomic/backends/_docker.py @@ -336,7 +336,7 @@ def pull_image(self, image, remote_image_obj, **kwargs): if '@sha256:' in image: image = image.replace("@sha256:", ":") - insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], util.strip_port(registry)) else False + insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], registry) else False trust = Trust() trust.discover_sigstore(fq_name) util.write_out("Pulling {} ...".format(fq_name)) diff --git a/Atomic/push.py b/Atomic/push.py index 368fe090..726011b8 100644 --- a/Atomic/push.py +++ b/Atomic/push.py @@ -189,7 +189,7 @@ def prompt(): if self.args.insecure: insecure = True else: - insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], util.strip_port(reg)) else False + insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], reg) else False # We must push the file to the registry first prior to performing a # local signature because the manifest file must be on the registry return_code = util.skopeo_copy(local_image, remote_image, debug=self.args.debug,