News for hackers. Stuff that matters.
Re:Twitter urges users to change passwords after computer 'g... by krapp on Thursday May 03, 2018 @06:38PM (#16990665)
>That means the hashing needs to be done client side, probably with JavaScript. Is there any safe way to do that?

No [0,1...n]. Note that these articles are about encryption, but the arguments against javascript encryption apply to hashing as well.

Also consider that no one logs this stuff accidentally to begin with. If the entity controlling the server and writing the code wants to log the passwords, they can rewrite their own javascript just as well as they can whatever is on the backend. There's nothing to be done about people undermining their own code.

[0]https://www.nccgroup.trust/us/about-us/newsroom-and-events/b...

[1]https://tonyarcieri.com/whats-wrong-with-webcrypto

Re:Twitter urges users to change passwords after computer 'g... by adrianmonk on Thursday May 03, 2018 @06:53PM (#16990755)
> consider that no one logs this stuff accidentally to begin with

It's possible. You create an object called Foo (possibly a serialized data like a protobuf, but any object), and you recursively dump the whole thing to the debug log. Then you realize, oh, when I access a Foo, sometimes I need this one field out of the User object (like their first name), so I'll just add a copy of User within Foo. You don't consider that the User object also contains the password as one of its members. Boom, you are now accidentally logging passwords.

Re:Twitter urges users to change passwords after computer 'g... by johnsonjo on Thursday May 03, 2018 @07:56PM (#16991048)
Any user object on the server should only ever have the password when it is going through the process of setting or checking the password, and this should be coming from the client and not stored. So, your case of logging the user would only be bad at one of those times. Otherwise like in the case of a stored user you should just have a hashed password and a salt in the user object.
Re:Twitter urges users to change passwords after computer 'g... by krapp on Thursday May 03, 2018 @09:01PM (#16991388)
Ok.

Creating a User object that holds a password (much less a password in plaintext) seems next level stupid to begin with, but fair enough, I guess it could happen.

Re:Twitter urges users to change passwords after computer 'g... by Alex3917 on Thursday May 03, 2018 @07:56PM (#16991045)
> Also consider that no one logs this stuff accidentally to begin with.

It can happen if requests are logged in middleware, and the endpoint developer doesn't know about it. It's still an extremely rookie mistake though, regardless of whether it was done accidentally or on purpose.