Live data from Hacker News

Gmail password first character is case insensitive on mobile device

support.google.com

41–50 of 278 posts

Re: Gmail password first character is case insensitive on mobile device

#41
post #24

Earlier quoted context omitted.

It was possible to login with the reverse of your password (as in password.split().reverse().join('')).

What was the reasoning? Unlike case or typos, you wouldn't accidentally type a password backwards.

For a long time, in some browsers/OSes there was a bug (or perhaps an archaic feature that was accidentally triggered) where the cursor in an input could get stuck and cause all new characters to be inserted to the left; I'm assuming it's related to that.

Re: Gmail password first character is case insensitive on mobile device

#42
post #31

Earlier quoted context omitted.

If your storing millions of passwords surely a version field and an if statement is not going to be a huge concern

It is definitely more complicated than changing the case and running the hash again

is_password_valid = hash_password(normalize_password_case(password) if version == 1 else password) == hashed_password

Re: Gmail password first character is case insensitive on mobile device

#43

I just want a phone number input box that will strip dashes for me. Many go to the effort of having an error message pop up that says "no dashes or parentheses allowed." So they went to the effort of writing special case code to notice and handle this ... by giving instructions to the person, instead of the computer.

There's a school of thought in interface design that you shouldn't change what the user inputs, as it can be a jarring experience for regular users.

Re: Gmail password first character is case insensitive on mobile device

#44
post #41
post #24

Earlier quoted context omitted.

What was the reasoning? Unlike case or typos, you wouldn't accidentally type a password backwards.

For a long time, in some browsers/OSes there was a bug (or perhaps an archaic feature that was accidentally triggered) where the cursor in an input could get stuck and cause all new characters to be inserted to the left; I'm assuming it's related to that.

Notably this was a bug on the input for _setting_ your password, so if you think you've set Password123, you might have actually set 321drowassP, so even after fixing the bug it would still bite many users.

Re: Gmail password first character is case insensitive on mobile device

#45
post #17

Earlier quoted context omitted.

Assuming the password is sent over the wire (rather than the salt being sent to the client, the client doing the hash, and sending the hash), the password will be stored in memory while the login process runs Normal password code would be if (doHash(password+salt) == storedHash) { failedLogins = 0; return 1; } failedLogins++; return 0; This would presumably be if (doHash(password+salt) == storedHash) { failedLogins =…

Even if it’s encrypted, they could send both forms. Edit: not a good idea.

I'm no security expert, but this would let someone try two unrelated passwords at once and so probably wouldn't be done client-side.

Re: Gmail password first character is case insensitive on mobile device

#46

Similarly there are many sites that allow you to log in using `your password` or `your password`.swapcase() (for example, Password123 or pASSWORD123). Automatically trying a variant only costs a single bit of entropy and can greatly reduce login issues

This doesn't always work by the way. When you venture outside of ASCII, it's quite often uppercase(lowercase(x)) ≠ uppercase(x) and/or the other way around.

The German letter ß gets uppercased to SS instead of ẞ by most libraries in a neutral/generic culture. ẞ on the other hand gets lowercased to ß.

This happens because there wasn't an official ẞ in German until recently but the uppercasing/lowercasing standard was already written for ß.

Re: Gmail password first character is case insensitive on mobile device

#47
post #31

Earlier quoted context omitted.

It is definitely more complicated than changing the case and running the hash again

is_password_valid = hash_password(normalize_password_case(password) if version == 1 else password) == hashed_password

Are we doing this client side or server side?

If you're actually using a 'strong enough' hash to prevent easy cracking if your hashed password database is leaked then you're doubling the server load which can be quite substantial in some cases.

Re: Gmail password first character is case insensitive on mobile device

#48

Earlier quoted context omitted.

This is in no way an educated guess, but it could be something about dealing with right-to-left language support?

The actual character bytes do not go end-to-start in RTL text, so I have a hard time seeing it'd be that. I have no better guess though.

But maybe humans were typing in reverse?

Re: Gmail password first character is case insensitive on mobile device

#49

I just want a phone number input box that will strip dashes for me. Many go to the effort of having an error message pop up that says "no dashes or parentheses allowed." So they went to the effort of writing special case code to notice and handle this ... by giving instructions to the person, instead of the computer.

Yup. My role of accepting phone numbers is `input.replace(/[^0-9+]/g, "")`. It might strip some expected information in rare cases but good enough for me.

This works for a lot of other things that people format wildly like Canadian postal codes (which are A1A 1A1 format but many places require presence or absence of a space), credit cards (strip the spaces) and so many other fields.

Re: Gmail password first character is case insensitive on mobile device

#50
I have recieved a few notifications of login attempts from Windows 8 phones. I wonder if there is other security allowances for these devices making them the ideal platform for launching attacks.

PS. You can see this for yourself, just leave a negative review for Staples Canada on google and your account will be attacked from somewhere inside Vietnam via windows phone.

Post reply on HN