7 ms·
Here's another problem that isn't discussed very much: error messaging and failure modes. I use a command line tool to generate passwords, and I use a password
by nerdponx 10y ago
Here's another problem that isn't discussed very much: error messaging and failure modes.
I use a command line tool to generate passwords, and I use a password database to store them. It has happened to me before that the maximum password length is something disconcertingly small, like 20 characters. I would copy and paste my password, submit, and then failed to be able to login. Why? Because my password in the "create" page was silently truncated on the front end, but the same truncation does not occur in all places, so I would type a longer password on the login page then what was registered in the system and it would fail.
Other times a password that was too long or contained whitespace would fail with a cryptic error message, or would tell me I failed to meet some other password rule that I know I did not fail to meet.
I don't understand how something with so many widely-recognized best practices associated with it can be implemented badly.
- throwanem 10y agoThe same way anything else well understood can be implemented badly: naïveté, incompetence, ignorant ukaze from on high, "well we had to have something but there wasn't enough time", or some combination thereof.
- eriknstr 10y agoThis is why the first thing I do when I create an account -- no exceptions as long as it's not a throwaway -- is always to log out and log back in. If there was a problem with password truncation I'll know straight away and I can either figure out what the truncated password should be and switch it to something that isn't truncated or if that's impossible I can create a new account. If I'm unable to create a new account at least I'll know to stay away from them without having done anything important yet.
- lsaferite 10y agoI read a recent anecdote bout a similar issue. The person had their long password silently truncated to 21 chars on the reset page and 20 chars on the login page. That sounds like a super fun thing to track down as an end user.
- crottypeter 10y ago(UK mobile network) giffgaff.com does this. You can enter any length (as far as I can tell) on the "set password" form but the login form will only submit 25 chars. This means you can successfully set your password to something you can never enter! It has been raised in their forum but the discussion there is drowned out by people missing the point entirely. https://community.giffgaff.com/t5/Help-Support/Password-Limits/m-p/4588010/highlight/true#M1562049 https://community.giffgaff.com/t5/Help-Support/Password-Limi...
- mathw 10y agoI've run into this kind of issue before. I had an 11-character password silently truncated to 10 on signup, then when I typed the full one into the login form it failed to log in. Woo. Can't remember what clue the system gave me that let me figure out what had happened now.
- syntheticnature 10y agoI ran into one of those... with a bank! Supposed 32-character limit, but the login page truncated at 31 via Javascript (was able to force my way in via using the console). Ever since I usually don't max out the listed length during generation, just in case.
- ioquatix 10y agoI think it was an account I had with Sony Planetside where the password was lowercased on signup, but not all parts of their site did it....... (e.g. forums, game itself, etc).
- devoply 10y agoFunny thing is this sort of password bug bit me on PayPal. PayPal of all places! Not sure if it was the length or a disallowed character, but no actual validation took place. Would let you "change" it to something and then never allow you login.
- nerdponx 10y agoI actually ended up on the phone with PayPal support because of this, they were one of the companies I had in mind.
- koolba 10y ago> Why? Because my password in the "create" page was silently truncated on the front end, but the same truncation does not occur in all places, so I would type a longer password on the login page then what was registered in the system and it would fail. Here's an even worse one than truncating the end of long passwords: truncating internal whitespace The change/reset password dialog for Apple ID does this. If your password is "foo bar baz bam" then it will happily convert it to "foobarbazbam" but not tell you it did so. Then when you go to log into your Apple ID on your phone, you include the whitespace, you try repeatedly and then lock your account (temporarily). Then you do it again... Some general advice is: - Don't silently truncate anything (i.e. don't limit the length) - Don't silently remove anything (i.e. don't remove whitespace) - Don't silently transmute anything (i.e. don't convert to lowercase) - Don't have a password max length with a limit less than $BIG_NUM chars[1] - Do give the user feedback rather than silently doing anything. [1]: You're hashing them anyway right? So the storage doesn't change. Though if you're using something like bcrypt be aware of the max hashed length: https://security.stackexchange.com/questions/39849/does-bcrypt-have-a-maximum-password-length https://security.stackexchange.com/questions/39849/does-bcry.... Also you can work around that by hashing the entire uses password (with say SHA-512) prior to inputting into bcrypt.
- snowwrestler 10y agoAre you sure? My Apple ID password has a bunch of internal white spaces and it works fine.
- koolba 10y agoI think it depends on when and where you updated it from. I ran into this issue last year doing it via https://appleid.apple.com/ https://appleid.apple.com/.
- vog 10y ago> Also you can work around that by hashing the entire uses password (with say SHA-512) prior to inputting into bcrypt. I wonder why people are so eager to combine different hash algorithms, especially a strong with a weaker one. If this is isn't a well-established anti-pattern, it should become one.[1] Why? Because in some sense it combines the weaknesses of both algorithms. Assume your password hash is: h(p) = bcrypt(sha512(p)) Assume in the future somebody generates a sha512() collision with p and q, while bcrypt() holds water: sha512(p) = sha512(q) It follows that: bcrypt(sha512(p)) = bcrypt(sha512(q)) and hence: h(p) = h(q) So any collision in sha512() translates directly to h(), bcrypt's strength is unable to protect you from that. Had you just used bcrypt(), you would not have been affected. Frankly, this is about collision and not about preimage attacks (the latter being more relevant for password cracking), but the former is usually a first step towards the latter. Also, this example demonstrates that combining a weaker and a stronger hash algorithms usually does not combine their strengths, but their weaknesses. [1] It is almost like inventing your own crypto primitives, which actually is a well-established anti-pattern.
- dasil003 10y agoThis partially happened to me on NBA League Pass. It was particularly confusing because I wasn't completely locked out. The failure mode was that my password was one character too long, and was truncated. On the login form, the length was restricted by javascript if you typed in the password, but using auto-fill from 1Password bypassed that. I thought they were locking me out for proxying or something until eventually by luck I noticed what was going on.
- Merad 10y agoI had a fun issue a few months ago with Team City at work. I was setting up a build to upload to our internal Nuget server, but the upload kept failing. I finally discovered (I don't remember how, but it took hours) that our randomly generated Nuget API key included a character that Team City didn't like and it was silently stripping that character from the input field in the build setup.
- obsurveyor 10y agoThis just happened to me on the Wii U with my Nintendo ID. I had set a 20 character password some time in the past(probably the limit on whatever webpage I used to sign up) and when I tried to log into my Wii U recently, only 16 characters were available for entry.
- Tyrannosaur 10y agoI have had that weird truncation happen several times. It is very frustrating, especially for someone who is first learning to make great long passwords, because they've never come across that problem before and now have to debug it. Recently I had another scenario happen to me: signing up for a job application login, use my password manager to make a password, everything's great. Then when I go to login, "please remove the disallowed symbol (") from the password input before continuing". Needless to say, I could not log in. And they made me wait 24 hours before resetting my password. I was much less keen on applying for jobs there after that.
- ryandrake 10y ago> I don't understand how something with so many widely-recognized best practices associated with it can be implemented badly. The same reason why we have other kinds of crappy software: People try to do it themselves rather than using a robust, tested, third party solution.
- Globz 10y agoHotmail did that my super long password, it freaked me out at first and I had to guess where the cut-off happened because I couldn't find the damn password length.
- Steeeve 10y agoAnd don't you absolutely love it when you realize that your password is failing because of a quotation character. It's then that you realize how seriously poor security is at this website that requires capital, lowercase, digits, and special characters in a password limited to 10 characters and doesn't like spaces.