RocketChat / RocketChat/Rocket.Chat
Failed login attempts count not reset according to time settings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Users who have failed logging in too many times, and have therefore been blocked, are perpetually blocked instead of actually reset after the block timeout.
Seems related to: https://forums.rocket.chat/t/ip-blocked-temporary/10932 and https://github.com/RocketChat/Rocket.Chat/issues/20088
Steps to reproduce:
- Ensure that there are limits per user and IP address, e.g. max 2 failed attempts and 1 minute lockout.
- Enable two-factor via email
- Log failed logins to a channel, so that you can see what happens (instead of the very noisy log function)
- Create a user
- Send them a password reset link
- Fail logging in
- Repeat
- Watch them be blocked for every failed attempt after the second, even though they wait more than 1 minute.
Expected behavior:
Failed login count for both IP address and user should be reset to zero when the blocking time has timed out.
Actual behavior:
User gets locked out, either by IP or username, every time.

Work-around:
Disable two-factor authentication via email.
Server Setup Information:
- Version of Rocket.Chat Server: 4.8.3
- Operating System: Debian Bullseye
- Deployment Method: snap
- Number of Running Instances: 1
- NodeJS Version: v14.18.3
- MongoDB Version: 4.2.17 / wiredTiger (oplog Enabled)
Client Setup Information
- Desktop App or Browser Version: Firefox 104.1, Chrome 105
- Operating System: Linux, Windows, MacOS
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named in the issue. Start by locating the failed-login blocking and timeout handling in the server authentication code, then reproduce the two-attempt, one-minute-lockout scenario. Done means failed-attempt counts for both the IP address and user reset after the configured blocking period.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100