Skip to main content

why Why do some websites (including Google!) trim whitespaces in user passwordpasswords?

Tweeted twitter.com/#!/StackUX/status/583265249278709760
Source Link
Chip Zhang
  • 731
  • 5
  • 5

why some websites (including Google!) trim whitespaces in user password?

I have just noticed that Google as well as some other sites trims the whitespaces in the password.

I can successfully sign into my google account even if I add extra spaces in the end of my password.

Is this behaviour intended or a bug?

I also tried some other sites, and I found out that many sites do such things.

I believe this is a very serious security issue, as some people may intentionally add spaces at the beginning or the end of the password to enhance the security.