From df8353b5405588513c1c5cc7f1fa9f9aa7dd342b Mon Sep 17 00:00:00 2001 From: Robert Chettleburgh Date: Fri, 22 Nov 2024 16:48:48 +0000 Subject: [PATCH] Fix: only set aws tokens if a key is specified https://github.com/laravel/framework/pull/53633 fixes laravel side here but it won't be patched into older versions --- src/BrefServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BrefServiceProvider.php b/src/BrefServiceProvider.php index 2a61d50..b9680e1 100644 --- a/src/BrefServiceProvider.php +++ b/src/BrefServiceProvider.php @@ -162,7 +162,7 @@ private function fixAwsCredentialsConfig(): void continue; } // If a different key is in the config than in the environment variables - if (isset($connection['key']) && $connection['key'] !== $accessKeyId) { + if (!isset($connection['key']) || $connection['key'] !== $accessKeyId) { continue; } @@ -175,7 +175,7 @@ private function fixAwsCredentialsConfig(): void continue; } // If a different key is in the config than in the environment variables - if (isset($disk['key']) && $disk['key'] !== $accessKeyId) { + if (!isset($disk['key']) || $disk['key'] !== $accessKeyId) { continue; } @@ -188,7 +188,7 @@ private function fixAwsCredentialsConfig(): void continue; } // If a different key is in the config than in the environment variables - if (isset($store['key']) && $store['key'] !== $accessKeyId) { + if (!isset($store['key']) || $store['key'] !== $accessKeyId) { continue; }