Trim spaces from the email address in the login field before processing the form #57

Closed
opened 2025-11-07 08:24:52 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @flawiddsouza on GitHub (May 17, 2017).

Currently the email address entered is accepted as it is. With trailing spaces and what not. This should definitely be fixed. Otherwise the login form processes the request and returns invalid username and password even when the email and password are correct.

Originally created by @flawiddsouza on GitHub (May 17, 2017). Currently the email address entered is accepted as it is. With trailing spaces and what not. This should definitely be fixed. Otherwise the login form processes the request and returns invalid username and password even when the email and password are correct.
GiteaMirror added the bug label 2025-11-07 08:24:52 -06:00
Author
Owner

@kspearrin commented on GitHub (May 18, 2017):

This is already being done. See

https://github.com/bitwarden/mobile/blob/master/src/App/Services/AuthService.cs#L216
and https://github.com/bitwarden/mobile/blob/master/src/App/Services/AuthService.cs#L254

I am not able to reproduce?

@kspearrin commented on GitHub (May 18, 2017): This is already being done. See https://github.com/bitwarden/mobile/blob/master/src/App/Services/AuthService.cs#L216 and https://github.com/bitwarden/mobile/blob/master/src/App/Services/AuthService.cs#L254 I am not able to reproduce?
Author
Owner

@flawiddsouza commented on GitHub (May 18, 2017):

Weird. You're right, it works perfectly with my phone. Maybe it has something to do with the custom os shipped with the phone my friend had. Sorry about this.

@flawiddsouza commented on GitHub (May 18, 2017): Weird. You're right, it works perfectly with my phone. Maybe it has something to do with the custom os shipped with the phone my friend had. Sorry about this.
Author
Owner

@kspearrin commented on GitHub (May 18, 2017):

Please let me know if you figure anything out. There have been some really weird reports coming in from a few users about the registration/login process on Android that I cannot reproduce.

@kspearrin commented on GitHub (May 18, 2017): Please let me know if you figure anything out. There have been some really weird reports coming in from a few users about the registration/login process on Android that I cannot reproduce.
Author
Owner

@flawiddsouza commented on GitHub (May 18, 2017):

I'll try to get access to the phone and reproduce the problem. If I find anything, I'll let you know.

@flawiddsouza commented on GitHub (May 18, 2017): I'll try to get access to the phone and reproduce the problem. If I find anything, I'll let you know.
Author
Owner

@jmlag commented on GitHub (Oct 14, 2019):

I am having this issue on the latest Android app and Firefox extension. @kspearrin

@jmlag commented on GitHub (Oct 14, 2019): I am having this issue on the latest Android app and Firefox extension. @kspearrin
Author
Owner

@kspearrin commented on GitHub (Oct 14, 2019):

@jmlag Can you reproduce the issue?

@kspearrin commented on GitHub (Oct 14, 2019): @jmlag Can you reproduce the issue?
Author
Owner

@jmlag commented on GitHub (Oct 14, 2019):

I just created a login with leading/trailing spaces. If you use the "copy username" button or fill in a site that doesn't trim their inputs you get the untrimmed string. The spaces are also preserved if I look at the entry in the web vault.

On a somewhat related note, if you go to "View Item" and manually highlight the "Name" or "Username" it doesn't display the leading/trailing spaces but it always adds a single trailing space at the end, even for names/usernames without trailing spaces.

@jmlag commented on GitHub (Oct 14, 2019): I just created a login with leading/trailing spaces. If you use the "copy username" button or fill in a site that doesn't trim their inputs you get the untrimmed string. The spaces are also preserved if I look at the entry in the web vault. On a somewhat related note, if you go to "View Item" and manually highlight the "Name" or "Username" it doesn't display the leading/trailing spaces but it always adds a single trailing space at the end, even for names/usernames without trailing spaces.
Author
Owner

@kspearrin commented on GitHub (Oct 14, 2019):

This issue is about registering and logging in with a Bitwarden account, not data stored in your vault.

@kspearrin commented on GitHub (Oct 14, 2019): This issue is about registering and logging in with a Bitwarden account, not data stored in your vault.
Author
Owner

@jmlag commented on GitHub (Oct 14, 2019):

Whoops, my mistake. Should I create a new issue or is this behaviour intended?

@jmlag commented on GitHub (Oct 14, 2019): Whoops, my mistake. Should I create a new issue or is this behaviour intended?
Author
Owner

@kspearrin commented on GitHub (Oct 14, 2019):

It sounds like intended behavior. We expect to take vault field information from the user without modification.

@kspearrin commented on GitHub (Oct 14, 2019): It sounds like intended behavior. We expect to take vault field information from the user without modification.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#57