From 617a5d02dc40803fe963d92c51d2ef22529e33e4 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Mon, 8 Aug 2022 09:50:13 -0400 Subject: [PATCH] Fixed potential infinity auth (#173) Follow up to an attempt in #169 --- Sources/tart/OCI/Registry.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/tart/OCI/Registry.swift b/Sources/tart/OCI/Registry.swift index 8f2533e..0789b30 100644 --- a/Sources/tart/OCI/Registry.swift +++ b/Sources/tart/OCI/Registry.swift @@ -258,7 +258,7 @@ class Registry { var response = try await authAwareRequest(request: request) - if response.status == .unauthorized { + if doAuth && response.status == .unauthorized { try await auth(response: response) response = try await authAwareRequest(request: request) }