What characters should I allow users to enter as their password?
8 Answers
Whatever characters they like. Being told your password is too secure is simply annoying.
1 Comment
Any character they like, and any length they like (except maybe not over your PHP Post limit). In a good password system, you only store the hash, and when logging in, you only send the hash as well. So it shouldn't matter.
And even if you store the password, you should escape any string you put in the database (mysql_real_escape_string), so any character could and should be allowed. If you store the actual password, you could limit the length to the field size, which I think should be at least 200 chars in that case.
Comments
I think the should be allowed to enter every letter they want. But you should enforce a proper length for the password to make it more secure. Also I would advise you to use federated login if you could:
- openid: lightopenid is a really easy library.
- facebook connect
- twitter single sign-in
These alternatives are going to be way securer.