Skip to content

Commit b8c5c1b

Browse files
committed
fix: use > instead of >= when comparing attempts count
1 parent c651aeb commit b8c5c1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/identity/UsersService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class UsersService {
349349
// GTA-80-009 WP2: Enforce per-IP attempts;
350350
const attemptsByIp = otpEntry.attemptsByIp || {}
351351
const attemptsForIp = attemptsByIp[clientIp] ?? 0
352-
if (attemptsForIp >= MAX_NUM_OTP_ATTEMPTS) {
352+
if (attemptsForIp > MAX_NUM_OTP_ATTEMPTS) {
353353
// should this delete the otpEntry as well?
354354
return errAsync(new BadRequestError("Max number of attempts reached"))
355355
}

0 commit comments

Comments
 (0)