aboutsummaryrefslogtreecommitdiff
path: root/lib/models/CaptchaChallenge.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/CaptchaChallenge.php')
-rw-r--r--lib/models/CaptchaChallenge.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/models/CaptchaChallenge.php b/lib/models/CaptchaChallenge.php
index 446985d..20b0fdf 100644
--- a/lib/models/CaptchaChallenge.php
+++ b/lib/models/CaptchaChallenge.php
@@ -38,7 +38,7 @@ final class CaptchaChallenge extends SimpleORMap
public static function createNewChallenge(): array
{
do {
- $salt = time() . '-' . bin2hex(random_bytes(12));
+ $salt = md5(time() . '-' . bin2hex(random_bytes(12)));
$number = random_int(1e3, 1e5);
} while (self::countBySql('salt = ? AND number = ?', [$salt, $number]) > 0);