Passwords are often white listed to prevent illegal or unrecognized characters, and the regex matching sometimes trims the whitespace by mistake. etc.
- Does Google allow spaces in passwords?
- Is white space allowed in password?
- Should passwords be trimmed?
- Should passwords accept space?
Does Google allow spaces in passwords?
By Google's rating standard, including whitespace improves the quality/strength of a password. Improves the strength, but may break applications - white space is often used to delimit parameters. The strength isn't entirely relevant to the question of whether you should allow them.
Is white space allowed in password?
Space is a regular password character, and you shouldn't remove it. Since you probably hash the password before storing it in the database, the space will be treated as any other character.
Should passwords be trimmed?
You should not trim the password. If you do not want to accept passwords with spaces then a password containing spaces should not be accepted. – Yves M.
Should passwords accept space?
Other restrictions: The password cannot contain spaces; for example, pass word . Passwords cannot be longer than 128 characters.