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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 28, 2010 at 22:26, Joshua Kehn <josh.kehn@xxxxxxxxx> wrote:
> Educate the users, don't compromise the system. Either go full on and trim everything (I don't recommend this) or trim
> nothing. Be consistent in which one you pick.
>

Then how about:
if ($trimmedPassword==$realPassword && $enteredPassword!=$realPassword){
    print "<p>Warmer!</p>";
}

I'm kidding. I'll not trim. But if $trimmedUsername !=
$enteredUsername I'll mention that fact to the user and remind him to
be careful to copy exactly what he means to copy. Username only, not
password.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux