GPT-6.1 Sol · Balanced
feat-2fa-backup-codes-cal-com
cal.com · TypeScript · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 1 of 1
- Comments published
- 3
- Comments matching a bug
- 1
- Comments not matching
- 2
- Cost of this PR
- $0.828
Published comments (3)
Backup-code login bypasses password verification when a TOTP code is supplied — A valid `backupCode` paired with any nonempty `totpCode` grants access to a password-based account without its password. Verify `credentials.password` for `IdentityProvider.CAL` accounts regardless of second-factor fields before entering the backup-code branch.
Concurrent logins can reuse or restore single-use backup codes — Unconditional writes to `backupCodes` let concurrent requests authenticate with the same code or restore another request’s consumed code. Consume codes atomically with a conditional update matching the previously read `user.backupCodes`, and reject or retry if no rows change.
Dismissing backup codes bypasses 2FA completion and leaves settings stale — Dismissing `SetupStep.DisplayBackupCodes` with Escape or an outside click skips `onEnable`, leaving `viewer.me` and the settings switch stale after successful enablement. Make dismissal invoke `onEnable` and reset `EnableTwoFactorModal`, or prevent dismissal until the explicit Close action.
Gold bugs found (1)
Gold bugs missed (0)
None.