mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-02 10:28:50 +03:00
More encrypt/decrypt improvements to revamp SSO data to be properly encrypted
This commit is contained in:
parent
cda88f438a
commit
9dae4cfa45
5 changed files with 64 additions and 48 deletions
|
|
@ -216,7 +216,7 @@ trait UserAuth
|
|||
if (empty($sSignMeToken)) {
|
||||
return null;
|
||||
}
|
||||
$aResult = \SnappyMail\Crypt::DecryptCookie($sSignMeToken);
|
||||
$aResult = \SnappyMail\Crypt::DecryptUrlSafe($sSignMeToken);
|
||||
return \is_array($aResult) ? $aResult : null;
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ trait UserAuth
|
|||
{
|
||||
Utils::SetCookie(
|
||||
self::AUTH_SIGN_ME_TOKEN_KEY,
|
||||
\SnappyMail\Crypt::EncryptCookie($aData),
|
||||
\SnappyMail\Crypt::EncryptUrlSafe($aData),
|
||||
\time() + 3600 * 24 * 30 // 30 days
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue