Live data from Hacker News

Gmail password first character is case insensitive on mobile device

support.google.com

81–90 of 278 posts

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

#81

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.

Why not simply leave it as the user input the value? Validation is one thing, but silently dropping information cannot possibly be helpful for the person that then has to call this number.

I agree it should work for any phone number I've ever encountered, but just why

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

#82
post #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…

This doesn't particularly matter since there's a perfectly good fallback for people who do happen to have "exotic" passwords: just type the password in correctly. As long as your mapping is consistent, it's totally fine if the bit sequence you're hashing is linguistically nonsense, because you're never going to display that to the user.

What you don't normally want to do is normalize passwords before hashing and then only store the hash of the normalized string, because that's fragile to changes in your normalization algorithm, e.g. updating your Unicode data tables.

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

#83

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.

Using letters in a phone number as a mnemonic, or just to flow better, is not a "rare case." You should revise your regex to accept letters, then whether you store them internally as letters or convert to the corresponding numbers is up to you.

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

#84
post #68

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.

This is like when on a cli application -h displays a hint that you probably meant --help (or the other way around). If you already know someone wants to display the help, why not just display it?

sounds like python which don't accept ctrl + c and says you to do ctrl + d or something (i don't know python)

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

#86
post #68

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.

This is like when on a cli application -h displays a hint that you probably meant --help (or the other way around). If you already know someone wants to display the help, why not just display it?

    >>> exit
    Use exit() or Ctrl-Z plus Return to exit

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

#87
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.

This is the first I've heard of it, and as a Linux user I feel like it's the kind of thing I'd either know about or experienced first-hand. What kind of system would do that? And "for a long time", like, you can't ever login anywhere, it's kind of obvious and breaking functionality badly, how can this exist for more than a single release if at all?

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

#88

This is a well-understood feature. Facebook does the same thing[0]. Quote: Facebook actually accepts three forms of your password: * Your original password. * Your original password with the first letter capitalized. This is only for mobile devices, which sometimes capitalize the first character of a word. * Your original password with the case reversed, for those with a caps lock key on. [0]: https://www.zdnet.com/a…

It seems to me that the third case could easily be subsumed by first transforming the text by inserting a "change case" token in front of any character with a different case than the previous character. In such a representation the original text and the "caps-locked" text are indistinguishable.

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

#89
post #68

Earlier quoted context omitted.

This is like when on a cli application -h displays a hint that you probably meant --help (or the other way around). If you already know someone wants to display the help, why not just display it?

sounds like python which don't accept ctrl + c and says you to do ctrl + d or something (i don't know python)

ctrl + c is accepted, it means "interrupt the current operation", like it does if you are in bash.

If there's no current operation, Python has no way of knowing for sure if you intended to exit, or if you intended to interrupt an operation, but the operation finished before you pressed the key combo.

Python's behavior here is good UX. A key combo that does two different things depending on the current state of the program, and the program's state is changing right in front of you... that would suck.

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

#90

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.

I’d like phone number input boxes to handle the country id in a sensible way instead of accepting the input as the wrong number.
Post reply on HN