Live data from Hacker News

Ask HN: Why do websites disallow spaces in passwords?

news.ycombinator.com

11–20 of 27 posts

Re: Ask HN: Why do websites disallow spaces in passwords?

#11
post #8
post #3

Earlier quoted context omitted.

Surely there must be some motivation for disallowing special characters, though... it's certainly not for security purposes. Maybe it's a weird form of overzealous SQL injection protection?

I think it might be so that you can type in your password on any keyboard. Some special characters may be missing on some keyboards, or they may need to be typed in differently, depending on your locale.

[deleted]

Re: Ask HN: Why do websites disallow spaces in passwords?

#14
To me, The most important reason to disallow spaces is being consistent with most of the web. Also, I think password with spaces are more likely to be forgotten. Its also easy to introduce spaces accidentally, and depending on the font parameters it might not be easily distinguishable too.

Re: Ask HN: Why do websites disallow spaces in passwords?

#15
post #10

"It's actually harder to disallow spaces" Traditionally, when deciding what password characters to allow/disallow, everyone thinks in terms of what to allow, not what to disallow. For example, a system that only allows alphanumeric characters in passwords (i.e. no special characters) would use less code to specify with regex that only a-z,A-Z,0-9 should be allowed, rather than specifying the many characters to be blo…

Right, but why block any characters at all? Blocking spaces is harder than blocking nothing is what I meant.

Re: Ask HN: Why do websites disallow spaces in passwords?

#16
post #6

Probably because of this. A bunch of coders get into a meeting with a bunch of managers, passwords and security come up, it's a bike shed issue, so everyone throws their two cents in. Some guy saw something break once because a password with a space was passed on exec(). Some guy knows that crypt() only uses the first 13 characters. Some guy knows that passwords with less than 5 characters are extremely weak. Some gu…

I love your story on this. Someone should write/compile a book of stories like this for every stupid "Best Practice" in programming and web design.

Re: Ask HN: Why do websites disallow spaces in passwords?

#18
post #5
post #3

Earlier quoted context omitted.

Surely there must be some motivation for disallowing special characters, though... it's certainly not for security purposes. Maybe it's a weird form of overzealous SQL injection protection?

For a company that really has no idea whatsoever about security: maybe they want to make sure they can read your password back to you over the phone in a way you'll understand?

Hm, yeah, this might actually be part of it. It would make me sad if a customer service rep could read my password to me, personally, but I suppose a lot of people probably like that.

Re: Ask HN: Why do websites disallow spaces in passwords?

#19
White space in passwords might be confusing if the system offers to email a user his own password. (Whether this should be done or not is another argument and is heavily dependent on the nature of the application.)

How much entropy does white space add to a password? Where are most people putting spaces in passwords? Are they using passphrases (in which case the position of spaces can be guessed and thus have low entropy)?

Given that I can think of a potential downside and possibly no gain in security, I can understand why some may default to not allowing it.

Re: Ask HN: Why do websites disallow spaces in passwords?

#20
post #16
post #6

Probably because of this. A bunch of coders get into a meeting with a bunch of managers, passwords and security come up, it's a bike shed issue, so everyone throws their two cents in. Some guy saw something break once because a password with a space was passed on exec(). Some guy knows that crypt() only uses the first 13 characters. Some guy knows that passwords with less than 5 characters are extremely weak. Some gu…

I love your story on this. Someone should write/compile a book of stories like this for every stupid "Best Practice" in programming and web design.

Yeah, but there isn't enough money in the world to make me want to go back to developing "enterprise" software. Let alone document its development.
Post reply on HN