Skip to content

Commit 39f3884

Browse files
committed
Use better time resolution in password generator
1 parent a2d4b3f commit 39f3884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/User.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public static function create(
279279
public static function createPassword($password, &$hash, &$salt) {
280280
$pepper = Common::$config->bnetdocs->user_password_pepper;
281281

282-
$gmp = gmp_init(time());
282+
$gmp = gmp_init(microtime(true)*10000);
283283
$gmp = gmp_mul($gmp, mt_rand());
284284
$gmp = gmp_mul($gmp, gmp_random_bits(64));
285285
$salt = strtoupper(gmp_strval($gmp, 36));

0 commit comments

Comments
 (0)