News for hackers. Stuff that matters.
Re:Ask HN: Why don't websites show password requirements at ... by jawns on Tuesday December 12, 2017 @10:51AM (#15906421)
Hi, I'm your product manager.

I'd like you to create a login page where a user can log in using their email address and a password.

We want our users to be made to feel as if we take security seriously, so let's use the following secure password requirements that I picked up from a blog post:

* Password must be AT LEAST 6 characters (but no more than 12, because who's going to remember more than 12 characters?)

* There must be at least one number.

* There most be at least one uppercase and at least one lowercase letter.

* There should be at least one special character, but not just any special character, because we don't want things to get crazy. Only these five: &$+#%

Okay, can you code that up for me?

Wait, it'll take how long?

Well, yes, I understand that you not only need to build in the validation logic but also need to build little error messages to let the user know what they've done wrong if their password doesn't meet all the requirements, plus allow time for writing tests, getting UX's rubberstamp, etc.

But I kind of need this by tomorrow afternoon. Is there anything we can consider out of scope?

Re:Ask HN: Why don't websites show password requirements at ... by rogual on Tuesday December 12, 2017 @10:57AM (#15906484)
My favourite are the ones where you're not allowed to use “the portion of your email address before the @” in your password. My email address is [email protected]. Fun times :D
Re:Ask HN: Why don't websites show password requirements at ... by gear54rus on Tuesday December 12, 2017 @11:38AM (#15906912)
Didn't you bring this on yourself?

I hate any requirements for passwords but why go for cornercase email?

Re:Ask HN: Why don't websites show password requirements at ... by gnu8 on Tuesday December 12, 2017 @11:43AM (#15906976)
Now you’re blaming the user though. The user isn’t wrong for having a valid email address.
Re:Ask HN: Why don't websites show password requirements at ... by gear54rus on Wednesday December 13, 2017 @04:21AM (#15913094)
There are degrees of valid. There is RFC valid and then there is 'common sense' valid (there are degrees of common too). Forcing yourself into barely common valid but RFC valid is user's fault.
Re:Ask HN: Why don't websites show password requirements at ... by gnu8 on Wednesday December 13, 2017 @10:57PM (#15919829)
Valid is a binary condition. Either an address is valid and you will be able to send mail to it, or it is not. That is usually the sole reason for validating an email address. If a bug in the validation logic causes an unusual email address to invalidate then the code is definitely wrong, not the user.

If the PM specifies a requirement to filter out email addresses with a single character before the @ sign, then that's a different thing. Maybe there is a business requirement to filter out people who own a domain and give themselves a single character email address? In that case it should be explicitly written into the validation logic and not done as a side effect of sloppy coding.

Re:Ask HN: Why don't websites show password requirements at ... by uranusjr on Wednesday December 13, 2017 @01:11PM (#15916097)
I fail to see how this email address does not qualify as common sense valid though. Maybe it’s just me being surrounded by tech-saavy people, but I have a bunch of friends using emails like [email protected] and [email protected].
Re:Ask HN: Why don't websites show password requirements at ... by lps41 on Tuesday December 12, 2017 @12:41PM (#15907608)
I don't see this as cornercase. I see this as going for easiest possible email address to type, and easiest possible email address to verbally communicate to someone.
Re:Ask HN: Why don't websites show password requirements at ... by sametmax on Tuesday December 12, 2017 @11:21AM (#15906740)
2h with django :)
Re:Ask HN: Why don't websites show password requirements at ... by bolololo1 on Tuesday December 12, 2017 @10:53AM (#15906442)
pretty easy with Reactive Angular Forms.
Re:Ask HN: Why don't websites show password requirements at ... by beokop on Tuesday December 12, 2017 @10:58AM (#15906493)
Not as easy as not implementing it though.
Re:Ask HN: Why don't websites show password requirements at ... by bolololo1 on Tuesday December 12, 2017 @11:02AM (#15906539)
:)
Re:Ask HN: Why don't websites show password requirements at ... by WhoIsSatoshi on Tuesday December 12, 2017 @11:15AM (#15906670)
sounds more like product manager here - unless roles blend where you're at