Use phpseclib for generating session encryption key

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2014-06-12 14:18:37 +02:00
parent da047efbd1
commit e433d8189b

View File

@ -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'];
}
/**