mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Code improvements
This commit is contained in:
parent
c43e35530e
commit
06d3dac310
13 changed files with 121 additions and 50 deletions
|
|
@ -2396,27 +2396,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
$sPassword = $this->clientRsaDecryptHelper($sPassword);
|
||||
$this->Logger()->AddSecret($sPassword);
|
||||
|
||||
if (0 < \strlen($sEmail) && 0 < \strlen($sPassword) &&
|
||||
$this->Config()->Get('security', 'allow_universal_login', true) &&
|
||||
$this->Config()->Get('security', 'allow_admin_panel', true) &&
|
||||
$sEmail === $this->Config()->Get('security', 'admin_login', '')
|
||||
)
|
||||
{
|
||||
if ($this->Config()->ValidatePassword($sPassword))
|
||||
{
|
||||
$this->setAdminAuthToken($this->getAdminToken());
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, true, array(
|
||||
'Admin' => true
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loginErrorDelay();
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
|
||||
}
|
||||
}
|
||||
else if ('sleep@sleep.dev' === $sEmail && 0 < \strlen($sPassword) &&
|
||||
if ('sleep@sleep.dev' === $sEmail && 0 < \strlen($sPassword) &&
|
||||
\is_numeric($sPassword) && $this->Config()->Get('debug', 'enable', false)
|
||||
)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue