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 15:12, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:
> The copy-paste thing I've noticed only really seems to happen on Windows, particularly with Outlook. The thing I always tell people if
> I'm emailing people a password is that they should type it out rather than copy paste to avoid these issues. The whitespace usually
> seems to consist of newlines and carriage returns, so you could try stripping those two characters out specifically rather than a full
> trim().
>

I do trim newlines, carriage returns, null characters, vertical and
regular tabs. However, the space is the problem. I don't think that
telling them to type it out is a good solution as it is "fixing the
user" which, although might be where the problem lies, is never the
solution.


> As you've said, a user might want a space in their password, and should be allowed to use them. Maybe add a footnote to the
> password field reminding people about accidental copied characters, and perhaps a Javascript counter that displays the number of
> characters used in the password field (as a lot of people know their password length but find counting the password character in a
> field difficult because the characters are all the same and the eyes can't follow easily)
>

I will add such a footnote in the event of a failed password attempt
(right there with the capslock warning) but I do not think that a
counter is a good method.


--
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