Does having a space at the end constitute a valid password
e.g “ABCD ” or “ABCD12 “
Would it be fine, if we trim the password input (i.e “ABCD” would be the effective string after trimming) prior to authentication
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I tend to trim “silently” almost everything the user types, as spaces are generally not shown in form elements.
But, for password fields, there is a ‘*’ or an equivalent — so even spaces are “visible” ; so you can’t trim the input silently.
Still, I would consider a password with a space at the beginning or end is not valid, and ask the user to modify it — but that’s probably a matter of personnal taste.
(Considering a user typing a space at the beginning or end of a password field is quite a rare situation, I would not indicate anything saying this is not allowed, though — until the user actually does that, of course : a registration form is already quite too complex for most users, so no need to say that kind of little/rare thing until it happens)