diff --git a/lib/User/Backend.php b/lib/User/Backend.php index f5924ce4..37a5793d 100644 --- a/lib/User/Backend.php +++ b/lib/User/Backend.php @@ -230,6 +230,12 @@ public function getCurrentUserId(): string { return ''; } + $tks = \explode('.', $headerToken); + if (\count($tks) !== 3) { + $this->logger->debug('Bearer token is no JWT'); + return ''; + } + $oidcSystemConfig = $this->config->getSystemValue('user_oidc', []); // check if we should use UserInfoValidator (default is false) if (!isset($oidcSystemConfig['userinfo_bearer_validation']) || !$oidcSystemConfig['userinfo_bearer_validation']) {