Strip trailing spaces from login email


(Chris Saenz) #1

Mobile keyboards tend to add spaces when auto-completing words. We don’t strip trailing spaces from email addresses on the login screen. I’ve had users trying to log in on mobile run into this, it returns "no account matches xyz@mail.com", for an account that does exist.

They are stripped from the invite form already. We should strip them on login too.


(Jeff Atwood) #2

Agreed @techapj can you take this? Anywhere the user can input data on signup (or login) we should be stripping leading and trailing spaces either during or prior to submission.


(Allen - Watchman Monitoring) #3

I’m forever copying email addresses in some manner that has a leading space… will be glad to see this managed!


(Arpit Jalan) #4

We does strip the the leading/trailing spaces from username/email via:

I am not able to repro the issue (on Desktop/Mobile) where leading/trailing spaces causes login error.


(Jeff Atwood) #5

Is this true for password reset form as well, though?


(Arpit Jalan) #6

Good catch! Not true in case of password reset, fixing now.

(Sign up form strips whitespace, checked earlier)


(Arpit Jalan) #7

Fixed via:

OOPS: trip trim :blush:


(Jeff Atwood) #8