RocketChat / RocketChat/Rocket.Chat
Reset password broken for accounts with upper case email address.
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 with upper case characters in their e-mail address, e.g. John.Doe@example.com are not recognized when requesting a password reset via the web frontend.
Steps to reproduce:
- With admin priviledges, go to /admin/users/new
- Create a new user with an e-mail address containing at least one upper case character, e.g. John.Doe@example.com
- Logout
- Go to /home, click on "Forgot your password?", enter the e-mail exactly as created, e.g. John.Doe@example.com
- Sign in with admin priviledges and check the logs: /admin/reports
Expected behavior:
The user should receive a password reset e-mail with instructions to reset their password.
Actual behavior:
The user does not receive an e-mail, because the request fails.
Log entry:
{"level":50,"time":"2024-01-23T13:50:38.369Z","pid":1,"hostname":"<redacted>","name":"System","err":
{"type":"errorClass","message":"No such email for user. [403]","stack":"Error: No such email for user. [403]<br> at AccountsServer._handleError (packages/accounts-base/accounts_server.js:1488:19)<br> at AccountsServer.Accounts.generateResetToken (packages/accounts-password/password_server.js:415:14)<br> at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:537:14)<br> at server/methods/sendForgotPasswordEmail.ts:36:13<br> at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40","isClientSafe":true,"error":403,"reason":"No such email for user.","errorType":"Meteor.Error"}
,"msg":"No such email for user. [403]"}
Server Setup Information:
- Version of Rocket.Chat Server: 6.5.2.
- Operating System: Ubuntu 22.04 LTS
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version: 5.0
Client Setup Information
- Desktop App or Browser Version: Firefox
- Operating System: Windows 10
Additional context
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
Start at server/methods/sendForgotPasswordEmail.ts and trace the Accounts.sendResetPasswordEmail and Accounts.generateResetToken calls shown in the log, including packages/accounts-password/password_server.js. Reproduce the reset request with an uppercase email address and verify that the user receives the password-reset email without the “No such email for user” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100