Re:Yahoo discloses hack of 1B accounts
by drodgers on Wednesday December 14, 2016 @08:19PM
(#13181480)
If the password is stored properly, (i.e. bcrypt) then there does need to be some length limit or it becomes too easy to DoS a service by sending it hundreds of megabytes of password to bcrypt. There's no reason for that length limit to be less than 100 characters though.
[ Parent
| on HN ]
Re:Yahoo discloses hack of 1B accounts
by dogma1138 on Wednesday December 14, 2016 @08:26PM
(#13181527)
You are going to be limited by the max http request size way before that.
To upload 100s or even more than a few megs you need a multipart message, a password form won't accept MP http requests.
Re:Yahoo discloses hack of 1B accounts
by patates on Thursday December 15, 2016 @04:13AM
(#13183393)
On the back-end there usually is a naive POST handler which happily accepts anything it can parse, unless a mature framework with sane defaults is used.
Re:Yahoo discloses hack of 1B accounts
by cookiecaper on Wednesday December 14, 2016 @08:57PM
(#13181703)
Yep, people who've run marginally popular sites have dealt with this before. Give someone a text box and watch them try to stuff 4GB of content in it. There has to be a cutoff somewhere, but as you note, it should be well outside of the realm of reasonable password lengths (hundreds of characters).
Re:Yahoo discloses hack of 1B accounts
by jsjohnst on Wednesday December 14, 2016 @09:11PM
(#13181761)
GitHub is the only website I can think of off the top of my head that doesn't limit to an arbitrarily small number (aka <100). Do you name any other "major" websites that allow 100 character passwords?
Re:Yahoo discloses hack of 1B accounts
by snowpanda on Thursday December 15, 2016 @01:45AM
(#13182914)
Amazon.com allows 128 characters: https://www.amazon.com/gp/help/customer/display.html?nodeId=...
Re:Yahoo discloses hack of 1B accounts
by amichal on Thursday December 15, 2016 @12:21PM
(#13186248)
Anything built with the popular rails gem devise allows 128 by default [1]
https://github.com/plataformatec/devise/blob/88724e10adaf9ff...
Re:Yahoo discloses hack of 1B accounts
by XorNot on Wednesday December 14, 2016 @11:09PM
(#13182325)
Hash the password locally (you are serving JavaScript over SSL right?) and only send the SHA256.
That would lock out anyone who chooses not to execute your JavaScript.
Requiring me to trust your code in order for you to decide whether or not to trust me is asking too much.
How would you know that the hash is of a password of sufficient entropy?
Re:Yahoo discloses hack of 1B accounts
by jensvdh on Thursday December 15, 2016 @12:43AM
(#13182716)
Never trust the client.
This isn't about trusting the client: it's about your endpoint being able to only accept a SHA256 hash sum from the client (thus: length limited) while allowing the user to input arbitrarily long passwords.
They hash in the browser: the only way they can mess with it by producing silly outputs, but that only hurts them.
Re:Yahoo discloses hack of 1B accounts
by libeclipse on Thursday December 15, 2016 @04:08AM
(#13183376)
I can't think of any security implications of hashing on the client-side. What's your thinking?
Re:Yahoo discloses hack of 1B accounts
by fnordsensei on Thursday December 15, 2016 @05:26AM
(#13183625)
Does salting work if you hash in the browser?
Re:Yahoo discloses hack of 1B accounts
by libeclipse on Thursday December 15, 2016 @05:36AM
(#13183664)
Well in this case the hash would be passed to Bcrypt or Scrypt, which have built in salt support, so client side salting wouldn't matter.
If the hashes are leaked, you could log in with them.