@@ -47,7 +47,7 @@ if($data->enable_2fa==true){
|
||||
exit();
|
||||
}
|
||||
|
||||
check_rate_limit($conn, 'setup_2fa', 5, 10 * 60, (string)$id);
|
||||
check_rate_limit($conn, 'setup_2fa', 5, 60, (string)$id);
|
||||
$twofa_secret = $_SESSION["pending_2fa_secret"] ?? "";
|
||||
if ($twofa_secret === "" || !hash_equals(generateTOTP($twofa_secret), $twofa_pin)) {
|
||||
echo json_encode(['success' => false, 'message' => 'Invalid 2FA code.']);
|
||||
|
||||
Reference in New Issue
Block a user