mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-06 16:16:29 +02:00
Increase entropy in tokens for remember directives
This commit is contained in:
@@ -369,7 +369,7 @@ class Auth {
|
|||||||
*/
|
*/
|
||||||
private function createRememberDirective($userId) {
|
private function createRememberDirective($userId) {
|
||||||
$selector = self::createRandomString(24);
|
$selector = self::createRandomString(24);
|
||||||
$token = self::createRandomString(24);
|
$token = self::createRandomString(32);
|
||||||
$tokenHashed = password_hash($token, PASSWORD_DEFAULT);
|
$tokenHashed = password_hash($token, PASSWORD_DEFAULT);
|
||||||
$expires = time() + 3600 * 24 * 28;
|
$expires = time() + 3600 * 24 * 28;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user