Re: Re: Do you trim() usernames and passwords?

From: Date: Tue, 28 Dec 2010 20:29:01 +0000
Subject: Re: Re: Do you trim() usernames and passwords?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-310288@lists.php.net to get a copy of this message
Joshua Kehn wrote:
On Dec 28, 2010, at 3:18 PM, Dotan Cohen wrote:
I'm toying with the idea of having the passwords hashed twice: they're already in the database hashed, and javascript hashes them on the client before sending them over, but I'm thinking about sending an additional salt to the client to hash the hashed passwords with salt, and that's what is sent back. This way, each login is done with a different hash of the password so an attacker cannot simply capture and reuse the hashed password. But before all that goes on, I have to decide what to do about leading and trailing spaces.
Toy with it and discard it. Client side hashing / salting is not a good idea. A much better alternative is to use SSL.
indeed, and on reflection, if you're putting this much effort in to it, and security is a worry, then forget username and passwords, and issue each user with a client side RSA v3 certificate and identify them via the public key of the cert.

« previous php.general (#310288) next »