Merge pull request #642 from LukaszC86/patch-1

2.20.5 - fix for broken admin login
This commit is contained in:
the-djmaze 2022-11-08 10:17:43 +01:00 committed by GitHub
commit 061b219a9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ class ActionsAdmin extends Actions
throw new ClientException(Notifications::AuthError);
}
$sToken = $this->setAdminAuthToken($sToken);
$sToken = $this->setAdminAuthToken();
return $this->DefaultResponse(__FUNCTION__, $sToken ? $this->AppData(true) : false);
}
@ -667,7 +667,7 @@ class ActionsAdmin extends Actions
return $this->DefaultResponse(__FUNCTION__, $QR->__toString());
}
private function setAdminAuthToken(string $sToken) : string
private function setAdminAuthToken() : string
{
$sRand = \MailSo\Base\Utils::Sha1Rand();
if (!$this->Cacher(null, true)->Set(KeyPathHelper::SessionAdminKey($sRand), \time())) {