Re: Re: Do you trim() usernames and passwords?
| From: | Joshua Kehn | Date: | Tue, 28 Dec 2010 20:24:31 +0000 |
| Subject: | Re: Re: Do you trim() usernames and passwords? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-310284@lists.php.net to get a copy of this message | ||
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.
Regards,
-Josh
____________________________________
Joshua Kehn | Josh.Kehn@gmail.com
http://joshuakehn.com