Use phpseclib for generating session encryption key
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
da047efbd1
commit
e433d8189b
@ -688,11 +688,10 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
*/
|
||||
private function _getSessionEncryptionSecret()
|
||||
{
|
||||
if (empty($_SESSION['auto_blowfish_secret'])) {
|
||||
// this returns 23 characters
|
||||
$_SESSION['auto_blowfish_secret'] = uniqid('', true);
|
||||
if (empty($_SESSION['encryption_key'])) {
|
||||
$_SESSION['encryption_key'] = crypt_random_string(256);
|
||||
}
|
||||
return $_SESSION['auto_blowfish_secret'];
|
||||
return $_SESSION['encryption_key'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user