RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.84k stars 10.76k forks source link

E-Mail address input should be trimmed #31397

Open david-uhlig opened 11 months ago

david-uhlig commented 11 months ago

Description:

E-Mail addresses on the user creation form /admin/users/new and on the login (web, possibly mobile as well) screen are not trimmed. This allows to accidentially create user accounts with leading or trailing whitespaces. Users will still receive the welcome e-mail but won't be able to login without replicating the e-mail address with the leading or trailing whitespaces.

Steps to reproduce:

Admin mistake

  1. Go to /admin/users/new
  2. Create a new account with the E-Mail set to " test@example.com" or "test@example.com ".
  3. Logout.
  4. Try to login using "test@example.com" afterwards.

User mistake

  1. Go to /admin/users/new
  2. Create a new account with the E-Mail set to "test@example.com".
  3. Logout.
  4. Try to login using " test@example.com" or "test@example.com " afterwards.

Expected behavior:

I expect both forms to be fault tolerant and trim whitespace at the beginning and end of the e-mail address.

Actual behavior:

Whitespace is not trimmed in either form.

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

harshbatra01 commented 11 months ago

Maintainers, can I start working on this issue?

AVtheking commented 11 months ago

I would like to work on this issue please assign me this issue

ghost commented 11 months ago

@david-uhlig I am working on this issue if I am able to fix this I will update with Snippets, pls assign me the task then I will raise a PR thereafter

hugocostadev commented 11 months ago

No need to ask for permission to fix the issue, feel free to work on it! Just check if someone it's already raised a PR for that (should be linked in this issue). Best of luck 🚀 👏


Questions? Help needed? Feature Requests?

AdityaInnovates commented 1 week ago

Could you let me know if this issue has been resolved? @hugocostadev @david-uhlig

david-uhlig commented 1 week ago

Just tested with Rocket.Chat Server 7.0.0. It's not resolved and still an issue.