Bug acl apiv2 pandora_enterprise#13065

This commit is contained in:
daniel 2024-03-13 14:24:29 +01:00
parent a5491383cf
commit ae1f586971
1 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,9 @@ final class UserTokenMiddleware
);
$uuid = ($matches[0] ?? '');
if (empty($uuid) === true) {
return false;
}
$strToken = str_replace($uuid.'-', '', $authorization);
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($strToken);
if ($validTokenUiniqueServerIdentifier === false) {
@ -55,7 +58,7 @@ final class UserTokenMiddleware
$token = null;
}
if ($token !== null) {
if ($token !== null && $validToken) {
if (session_status() === PHP_SESSION_NONE) {
session_start();
}