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