From 86641bb7564db7625f9a3c21c066ab493e0ef3c4 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 22 Oct 2024 11:29:48 +0200 Subject: [PATCH] fix: Ensure $providerClientId is declare Signed-off-by: Louis Chemineau --- lib/User/Validator/SelfEncodedValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/User/Validator/SelfEncodedValidator.php b/lib/User/Validator/SelfEncodedValidator.php index 9f3bd1d5..e35ca9f7 100644 --- a/lib/User/Validator/SelfEncodedValidator.php +++ b/lib/User/Validator/SelfEncodedValidator.php @@ -88,9 +88,9 @@ public function isValidBearerToken(Provider $provider, string $bearerToken): ?st $oidcSystemConfig = $this->config->getSystemValue('user_oidc', []); $checkAudience = !isset($oidcSystemConfig['selfencoded_bearer_validation_audience_check']) || !in_array($oidcSystemConfig['selfencoded_bearer_validation_audience_check'], [false, 'false', 0, '0'], true); + $providerClientId = $provider->getClientId(); if ($checkAudience) { $tokenAudience = $payload->aud; - $providerClientId = $provider->getClientId(); if ( (is_string($tokenAudience) && $tokenAudience !== $providerClientId) || (is_array($tokenAudience) && !in_array($providerClientId, $tokenAudience, true))