We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e748c8b commit febd6abCopy full SHA for febd6ab
interface/web/login/otp.php
@@ -129,8 +129,7 @@ function finish_2fa_success($msg = '') {
129
130
//* set code
131
if(!isset($_SESSION['otp']['code']) || empty($_SESSION['otp']['code'])) {
132
- // Random int between 10^($code_length-1) and 10^$code_length
133
- $_SESSION['otp']['code'] = rand(pow(10, $code_length - 1), pow(10, $code_length) - 1);
+ $_SESSION['otp']['code'] = random_int(100000, 999999);
134
$_SESSION['otp']['starttime'] = time();
135
}
136
0 commit comments