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 02:49:59PM +0200, Dotan Cohen wrote:

> I seem to have an issue with users who copy-paste their usernames and
> passwords coping and pasting leading and trailing space characters.
> The obvious fix was to trim() the values that I receive, but I worry
> how that would affect users who use a space at the beginning or end of
> their password. Of course, if I trim() also when the user is setting
> his password then he will never know that his password is really 1
> digit shorter, but do I really want to do that? Thoughts? Thanks!

If users want to embed spaces in their passwords, well and good. But at
the beginning or end? No. Trim them. As mentioned elsewhere, I suspect
this is mostly because of copying and pasting.

Paul

-- 
Paul M. Foster
http://noferblatz.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