mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
refactor: use random_int() for email change verification codes (#9226)
This commit is contained in:
4 files changed
+128
-2
No files matched your search
+1
-1
@@ -395,7 +395,7 @@ class User extends Authenticatable implements SendsEmail
|
||||
public function requestEmailChange(string $newEmail): void
|
||||
{
|
||||
// Generate 6-digit code
|
||||
$code = sprintf('%06d', mt_rand(0, 999999));
|
||||
$code = sprintf('%06d', random_int(0, 999999));
|
||||
|
||||
// Set expiration using config value
|
||||
$expiryMinutes = config('constants.email_change.verification_code_expiry_minutes', 10);
|
||||
|
||||
Reference in new issue
Block a user