Comment by repeekad
Comment by repeekad 4 days ago
I’ve personally experienced the password change require that “more than X characters be different than the old password”
Comment by repeekad 4 days ago
I’ve personally experienced the password change require that “more than X characters be different than the old password”
No, you can do it safely. The idea is to have the password renewal process also ask for the previous password.
This means the password changing method doesn't need to store a plaintext password, but still has access to the old plaintext password when changing. It's still not a great idea, but that's because nagging your users will see them choose worse passwords.
Oh so trivially bypassable by changing your password twice.
No it doesn't. Shows you how complicated all this is and how the un-initiated (including me) should learn to not give their two cents.
When you do the password change it asks you for the old one, that's how it knows.
So it asks for old + new, checks old is correct against the hash, and then compares old + new likeness.
So it all happens in memory.
Actually it can be trivial as long as you can require the user to re-type the current password when entering a new password; check hash first, then check edit distance with the entered "current password" (and, of course, promptly throw it away once you know the edit distance.)
Um, that's a really bad sign...