67 points•tanin•about 2 months ago•99 comments•

99 comments

Sohcahtoa82about 2 months ago
I got bit by a similar issue with another service.

I could log into the website just fine, but the app kept saying my password was wrong. I reset my password, and when I was generating a new password, I found the root cause:

At some point, they changed the password policy to have a maximum length of 16 characters. My existing 20 character password worked fine in the website which didn't actually enforce a 20-character limit in the password field, but the app was silently truncating the last 4 characters when BitWarden was filling in the field.

Limiting password length to only 16 characters scares me. It makes me think they're not hashing passwords in the back end.

vegetablepotpieabout 2 months ago
These are the same companies that state that users are responsible for choosing secure passwords… and then they make this as difficult as possible to do.

Finance needs to be held accountable. They’ve skim off far too much wealth for the value they produced.

alright2565about 2 months ago
Well, in the USA as it is, they are already accountable under Reg E for any fraud losses due to a failure of an "access device" aka password. I'm not sure what else you would want.
sippingabonedryabout 2 months ago
> they make this as difficult as possible to do.

They provided password requirements which he ignored.

> Finance needs to be held accountable.

Accountable for what, exactly?

lapcatabout 2 months ago
> They provided password requirements which he ignored.

No, you misunderstood what happened: "Chrome inputs only abcdefghijklmnopqrstu (20 characters) as shown below"

1Password generated a password longer than 20 characters. When pasted, Chrome silently truncates the paste to the input maxlength!

Look at the screenshot: The requirement "Between 8 to 20 characters long" has a green checkmark, because the requirement is satisfied.

nemomarxabout 2 months ago
if the requirements make it less secure, isn't that the issue op is complaining about? max lengths are an anti feature.
techgnosisabout 2 months ago
And if someone gets into your account and robs you, that's your problem too!
40fourabout 2 months ago
I’ve ran into this same issue numerous times on different platforms. They silently enforce a max length, unannounced to you, then you can’t log in later until you figure out the correct length.

I guess I don’t really understand the reasons any engineering team would limit password length, but at least implement in a way that is apparent to the user. Successfully saving a password that is different than the user expects is wild.

Moreover, in the case of a financial institution like Vanguard, limiting password length feels particularly offensive.

efilifeabout 2 months ago
> I guess I don’t really understand the reasons any engineering team would limit password length

The bcrypt hashing algorithm doesn't work on inputs above ~60* characters or so. It will just silently trim your input. Better to do it yourself

*72 bytes

Atherosabout 2 months ago
In case any programmers read this, the better procedure, if you want to use bcrypt, is to hash the password with something else first, like SHA512, then feed the output into bcrypt.
40fourabout 2 months ago
Interesting, I didn’t know that. My knowledge of cryptography is admittedly not great. 20 characters limit is pretty aggressive though.
taninabout 2 months ago
At least not 20 characters. My generated password isn't insane. It is 4 words with delimiters, so the length varies between 20-28 characters.
bootloopedabout 2 months ago
My biggest question here is are they not just feeding the input into a hash function, why can't it be longer than 20 characters?
frenchtoast8about 2 months ago
TFA says the mobile app works (so presumably the backend accepts long passwords fine). Looks like it's just a frontend issue. I wonder if deleting the maxlength attribute before submitting the form works fine?
arkadiytabout 2 months ago
bcrypt famously only looks at the first 72 bytes of the input. There are ways around that - don't use bcrypt, or do bcrypt(sha256(password)), or whatever, but it is not the case that "just feed the input to the hash" removes all length restrictions
matjaabout 2 months ago

    CREATE TABLE passwords (
      email VARCHAR(MAX),
      password VARCHAR(20) UNIQUE -- unique passwords are more secure.
        -- NOTE: "20" here because we used to use SHA1 hashes
        -- but there was an issue with storing binary in CP437
        -- so we just renamed the field.
    )
kstrauserabout 2 months ago
That just made me twitch so hard that I have a crick in my neck.
coaksfordabout 2 months ago
At some point you don't want people to enter the bee movie script, but where the word "bee" was replaced with the entire bee movie script again, recursively three times, all into the password field and tie up servers with extremely long requests.

But 20 characters is simply ridiculous.

shermantanktopabout 2 months ago
<input type="password" maxbeemovierecursions="2">
hombre_fatalabout 2 months ago
It's a good habit to always create an upper bound on things (input max length, queue size, etc).

The person who wrote it just came up with 20 in the moment and forgot to go check, something everyone has done a hundred times.

I've probably never worked on a single system where the html validation, http server validation, and database constraint were synchronized on username max length. You choose a placeholder, an even number between 10 and 16, then forget to ever check.

happyopossumabout 2 months ago
> Of course, my generated password is longer than 20 characters

Ok, yes - an undisclosed max length that doesn’t throw an error is horrible, *and this is entirely Vanguard’s fault* but what’s with the “of course”?

There’s virtually no reason to use a randomly generated password that long, and there have been more than enough stories, anecdotes etc about sites failing on long passwords that throwing an “of course” here is a little overboard.

A high entropy random password with 62+ potential characters before including “special characters” with a length of 16 characters is basically un-bruteforceable. It would take 4.6 billion years to brute force at 164.1 billion guesses per second, and vanguard (or anyone else) is gonna notice if you try the 4.77 × 10^28 possible combinations.

raddanabout 2 months ago
You are right about high entropy short-ish passwords but almost nobody does that. Virtually everybody chooses something not just low entropy but often easily crackable with good search heuristics. Why not give people another way to produce passwords that are harder to crack? With luck, at least a few people will choose a correct-horse-battery-staple.
malfistabout 2 months ago
It costs me nothing to use a 20+ character password. The questions isn't why should you, the question should be "why shouldn't you?"
doubletwoyouabout 2 months ago
1. For whatever reason, and a reason will come, typing out those extra characters will be an extra pain.

2. Stupid choices by services (like Vanguard!) making those extra characters a liability.

3. What are you protecting against? Even 16 characters with ~60 combinations is more than enough entropy.

4. It’s just cumbersome. And that, frankly, is the reason why the question is “why should you?”

clickety_clackabout 2 months ago
taninabout 2 months ago
My 1password actually generates 4 random words with symbols and numbers as delimiters. A generated password is often ~24 characters.

Read the full thread on Hacker News →

Related stories