Security Tip

Hi folks, When you design your sophisticated "Change Password" feature in your next application make sure to retain the old password so the user can't re-choose them anymore..

You can keep a history of passwords and don't allow to use them again.

[UPDATE]

The reason you may wanted to do this..if your password base compromised you wanted to change the password for your clients to something tempporary and also prevent them from changing this back to the old compromized one, however you also will benfit from this stratigy to force users to never having the same password they already changed - why they change their password on the first place - to be using it again...

Published Tue, Jul 17 2007 2:58 PM by Adel Khalil

Comments

# re: Security Tip

Tuesday, July 17, 2007 2:18 PM by Rick van den Bosch

Hi Adel,

Although I get your tip, I'm not quite sure I agree. Probably because you don't post why you should do this. ;)

I think the user is the one who, as soon as he/she chooses to change his/her password, is responsible for choosing a good password.

And by the way, my hotmail and Gmail passwords (for example) have been te same since I got an account...

# re: Security Tip

Tuesday, July 17, 2007 3:41 PM by Arjan Zuidhof

The idea is good, but it's not really safe to keep  the passwords itself in the backend. A much safer approach would be to hash it before it goes into the database. Then, at login you compare the hash of what the user entered with what's in the database.

If you want, you then keep a log of old password hashes to prevent an old pw from being chosen again.

Even better is to use a so-called 'salted hash'.

# re: Security Tip

Tuesday, July 17, 2007 5:25 PM by Adel

@Rick van den Bosch

The reason you may wanted to do this..if your password base compromised you wanted to change the password for your clients to something tempporary and also prevent them from changing this back to the old compromized one, however you also will benfit from this stratigy to force users to never having the same password they already changed - why they change their password on the first place - to be using it again...

@Arjan Zuidhof

exactly how this should work.

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 7 and 7 and type the answer here: