RocketChat / RocketChat/Rocket.Chat
"Block failed login attempts by Username" prevents new users from registering
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
During registration a username is not set for the user, (email, password and name is set, username is not), the user only selects their username after first login. However, if "Block failed login attempts by Username" is enabled, new users cannot complete this first login. Their username is unknown and therefore the blocking policy rejects the login:
I20210410-20:48:31.111(0) Failed login detected - Username[unknown]
This effectively prevents users from registering, an admin has to set their username for them manually in order for the user to be able to login.
Steps to reproduce:
- Enable "Block failed login attempts by Username"
- Complete registration form
- Click the register button
Expected behavior:
The user should be able to set their username and complete the registration process. This could either be accomplished by requesting the user to set an username before first login, or by making an exception to the "Block failed login attempts by Username" policy for the situation where the username is unknown.
Actual behavior:
The to-be-registerd user is not prompted to set their username, and is not able to complete the registration process.
Server Setup Information:
- Version of Rocket.Chat Server: 3.12.3
- Operating System:
- Deployment Method: Trial version on the cloud
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 12.18.4
- MongoDB Version: 4.4.3
Client Setup Information
- Desktop App or Browser Version: Firefox 87.0
- Operating System: Gentoo Linux 5.11.7
Additional context
Relevant logs:
I20210410-20:48:31.111(0) Failed login detected - Username[unknown]
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 file or test is identified in the issue. Start by reproducing registration with “Block failed login attempts by Username” enabled, then trace the registration and first-login flow to determine where the unknown username is rejected; done means new users can complete registration while the blocking policy still works for applicable logins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100