Skip to content

Commit

Permalink
Merge pull request #969 from nextcloud/artonge/fix/providerClientId
Browse files Browse the repository at this point in the history
fix: Ensure $providerClientId is declare
  • Loading branch information
julien-nc authored Oct 22, 2024
2 parents 647dae6 + 86641bb commit bdc807d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/User/Validator/SelfEncodedValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit bdc807d

Please sign in to comment.