mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Merge pull request #642 from LukaszC86/patch-1
2.20.5 - fix for broken admin login
This commit is contained in:
commit
061b219a9a
1 changed files with 2 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ class ActionsAdmin extends Actions
|
||||||
throw new ClientException(Notifications::AuthError);
|
throw new ClientException(Notifications::AuthError);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sToken = $this->setAdminAuthToken($sToken);
|
$sToken = $this->setAdminAuthToken();
|
||||||
|
|
||||||
return $this->DefaultResponse(__FUNCTION__, $sToken ? $this->AppData(true) : false);
|
return $this->DefaultResponse(__FUNCTION__, $sToken ? $this->AppData(true) : false);
|
||||||
}
|
}
|
||||||
|
|
@ -667,7 +667,7 @@ class ActionsAdmin extends Actions
|
||||||
return $this->DefaultResponse(__FUNCTION__, $QR->__toString());
|
return $this->DefaultResponse(__FUNCTION__, $QR->__toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setAdminAuthToken(string $sToken) : string
|
private function setAdminAuthToken() : string
|
||||||
{
|
{
|
||||||
$sRand = \MailSo\Base\Utils::Sha1Rand();
|
$sRand = \MailSo\Base\Utils::Sha1Rand();
|
||||||
if (!$this->Cacher(null, true)->Set(KeyPathHelper::SessionAdminKey($sRand), \time())) {
|
if (!$this->Cacher(null, true)->Set(KeyPathHelper::SessionAdminKey($sRand), \time())) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue