3 ms·
Something I've always disliked about password rules is the "special" treatment of special characters. What makes one character special and not another? Is % spe
by ryandrake 10y ago
Something I've always disliked about password rules is the "special" treatment of special characters. What makes one character special and not another? Is % special? Why? Can I use ½ in my password and have it count as a special character? How about 特别? What about Ѕ, Κ, and о? Does "special" mean non-ASCII, non-alphanumeric, not-on-the-keyboard or something else? Why is it that sometimes some "special" characters are allowed and others are not, even if they're right next to each other on the keyboard? Why require one? Is "P@ssword" really better than "correct horse battery staple"?
- Bartweiss 10y agoMy experience is that "special" almost always means "non-alphanumeric ASCII". Anything beyond that is banned pretty much everywhere, unless you get really unlucky and it's stripped into nearest-equivalent ASCII, giving you a result fundamentally different from what you typed in.
- curun1r 10y agoThe thing I've always found concerning about sites disallowing certain special characters is that it makes you worry that they're doing something other than immediately feeding the raw password bits into a password hashing algorithm. It's not that disallowing those characters will lead to more insecure passwords that worries me, it's that it indicates that the site is more likely to be making other mistakes that will allow my account to be compromised in some way that doesn't attack the strength of the password. The only reason I can fathom for disallowing certain characters is if they expect a use case where someone will be entering their password on equipment incapable of entering those characters. For example, let's say TSA's Global Entry program required people to authenticate as they're passing through customs. In that case, it would be perfectly reasonable to limit valid password characters to those that can be entered on the available keyboards. But those kinds of use cases are few and far between.
- x1798DE 10y agoI think generally people stick to ASCII printable characters because of the support cost, since the benefit of allowing non-ASCII passwords is not generally worth the headache of dealing with customers who find themselves trying to log in to their account a terminal that isn't configured for the character set their password is in. As for other special characters, a properly implemented password storage system would just dump these directly into a key-derivation function before it ever touches a database, but I think you get those rules from a mix of: 1. people who are storing their passwords in plaintext and are worried about SQL injection attacks and 2. people who know to pass them to a KDF before storing them in the database and either have inherited some old rule about "no special characters" or who are not convinced that someone in the future won't make changes to the system such that special characters would become a problem, and are trying to make it more robust to potential reversions. Not saying it's a good idea, but at least some people "doing things right" will still have somewhat reasonable concerns about special characters.
- Sohcahtoa82 10y agoWhen it comes to not allowing the usage of certain punctuation, I've always assumed it's because the person who wrote the code doesn't know how (or doesn't trust themselves) how to prevent injection so they just forbid the usage of characters that can be used for injection.