Skip to content

Commit 361a5ef

Browse files
committed
Increment otp_attempts also for otp_attempts
1 parent 1176d84 commit 361a5ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

interface/web/login/otp.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ function finish_2fa_success($msg = '') {
8989
if ($_SESSION['otp']['recovery'] == $_POST['code']) {
9090
finish_2fa_success('via 2fa recovery code');
9191
}
92+
else {
93+
$app->db->query('UPDATE `sys_user` SET otp_attempts=otp_attempts + 1 WHERE userid = ?', $_SESSION['s_pending']['user']['userid']);
94+
}
9295
}
9396

9497

0 commit comments

Comments
 (0)