Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Easiest way is to do it on the client. The client has the plaintext password anyway.


Good point.

But is storing a plaintext password, even on the client, good practice? E.g. in a browser that uses a cookie with something like a session ID to make sure you're logged-in... is storing a plaintext password in localStorage considered a valid security practice? I would have assumed not, although it's certainly not close to as bad as storing it on the server...


if you store plaintext password on the client, you'd be one XSS attack away from potentially having a lot of passwords stolen - best practice is to have password in plaintext for a little as possible (there's some research on not transmitting the password at all but I don't think there's anything widely accepted like bcrypt is for password hashing https://en.wikipedia.org/wiki/Zero-knowledge_password_proof)


You are already one xss attack away from having your session stolen or having your credentials stolen or any number of other bad things. Passwords on the client are fine.


Unless the user uses the same password for other things, which is extremely common.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: