Should users be allowed to entered a password with a space at the beginning or end?

passwords

Solution

Yes, they should.

- It annoys me to no end when people decide how my password should behave especially when it's nonsensical. I would like more than 8 characters please.

- You should be hashing the password, so maximum character lengths and spaces at the end don't matter.

No, you should not trim it.

- You require a user to enter the password twice (when creating it) to eliminate typing errors. Therefore a space doesn't matter.

Problem

Should users be able to enter a password such as " 12345" or "12345 " – a space at the beginning or end? Or would you trim the password to remove the leading or trailing spaces because it may just a typing error.

Original source