I think the real lesson here is that if emails should remain secret you should not indicate upon signup whether or not a user exists with that email. Always send an email. If that user already exists, make sure the email says "We noticed you're trying to sign up again. If you didn't do this, someone else is trying to sign up for you." If that user doesn't exist, send them the typical signup message. The author has so…
Please don't always send an email. A malicious person can now start signing up every day with a bunch of emails resulting in users who do have an account receiving an email from your site daily/hourly saying "we noticed you're trying to sign up again". At which point they become annoyed with your service and either unsubscribe or delete their account. Hotmail do this everytime someone tries to reset my password which…
“Invalid username or password” is a useless security measure
151–160 of 188 posts
Re: “Invalid username or password” is a useless security measure
#152> Consider throttling invalid login attempts by IP address or subnet. Oh hell no. First off that is completely ineffective. Botnets are common and inexpensive. But worse still a lot of users often share a single IP (e.g. university dorms, businesses, public wifi, etc). I agree with the first part of this article (i.e. that it is trivial to "prove" a username is valid, and that worse error responses aren't accomplishi…
> Set no maximum password length (250+ characters) It's important to note that if you take the classical advice to "use bcrypt" ( http://codahale.com/how-to-safely-store-a-password/ ), your password will be effectively truncated at 72 characters.
Re: “Invalid username or password” is a useless security measure
#153Earlier quoted context omitted.
More likely, people won't forget how to spell their email address, or make a mistake in typing it that isn't immediately obvious; they might not remember which of their emails they used to sign up, though, even if they only have a couple. No one else can sign up with an email address that belongs to you.
You'd be surprised... After removing the "type it twice" box during registration, the bounce rate of "welcome" emails went up quite a bit.
Well, a lot of people do not know their own phone number.
Re: “Invalid username or password” is a useless security measure
#154I think the real lesson here is that if emails should remain secret you should not indicate upon signup whether or not a user exists with that email. Always send an email. If that user already exists, make sure the email says "We noticed you're trying to sign up again. If you didn't do this, someone else is trying to sign up for you." If that user doesn't exist, send them the typical signup message. The author has so…
Thanks for this. I updated the post to add this as a possibility. This adds more friction in the signup process than I'd be willing to accept, but it does solve the information disclosure problem.
Re: “Invalid username or password” is a useless security measure
#155"We are dumb enough to force your password to have at least one Uppercase/Lowercase/Number/Symbol and it must be at least 8 characters long, but you can't have consecutive numbers, this may make it different from your usual password pattern and force you to recover the password every goddam time you try to use our site".
Re: “Invalid username or password” is a useless security measure
#156Earlier quoted context omitted.
Well you can at least inform the user that the username is incorrect if there is no user by that name.
You would still have the issues described in the OP. If it says "username incorrect" only when that user does not exist, you can still figure out a username by just trying them with a random password. If you get told "password incorrect" you know the username you just tried already exists.
Re: “Invalid username or password” is a useless security measure
#157Earlier quoted context omitted.
Many people are paranoid about connecting Google/Facebook to anything. You will lose users if you don't give them a plain username/password option.
I know, but it's so much easier. It's not like I can't look up someones email account manually without federated login, plus then I no longer have to store passwords. Of course, aside from my own projects, the only service I've seen that exclusively does this is Fancy Hands.
The problem is that Facebook totally mismanaged their apps when they first launched, and a lot of people were permanently turned off to "Connect to Facebook" functionality by random apps posting under the user's name.
My account was recently abused by Glassdoor, which fervently promised not to post anything to my friends, and then immediately did so.
Re: “Invalid username or password” is a useless security measure
#158Earlier quoted context omitted.
You'd be surprised... After removing the "type it twice" box during registration, the bounce rate of "welcome" emails went up quite a bit.
That's interesting. I always felt that repeating that field was a sort of faux validation, but maybe not! Well, a lot of people do not know their own phone number.
Re: “Invalid username or password” is a useless security measure
#159I think the real lesson here is that if emails should remain secret you should not indicate upon signup whether or not a user exists with that email. Always send an email. If that user already exists, make sure the email says "We noticed you're trying to sign up again. If you didn't do this, someone else is trying to sign up for you." If that user doesn't exist, send them the typical signup message. The author has so…
This is important. It is not always necessary or appropriate to try to maintain the secrecy of otherwise public, directory information (like email addresses). Unless you are, say, FetLife, it doesn't actually make that much sense to hide the fact that joe@example.com has at one point signed up for your service.
On the other hand, associating joe@example.com with posts he thought were anonymous is an enormous violation.
Re: “Invalid username or password” is a useless security measure
#160Earlier quoted context omitted.
> This doesn't address timing attacks, which are why this is done in the first place. I don't follow. Surely the reason to hide usernames is not to prevent a timing attack that would reveal... usernames.
I might be missing what you're not following, but here's a quick explanation (and a reason why it's not a concern) Correct username, correct password: takes 30ms to execute the code Correct username, incorrect password: takes 15 ms to execute the code Incorrect username: Takes 7 ms to execute the code. You fuzz usernames, you get one that takes 15 ms, you know that's a valid username. You then start working the passw…
If anything the timing attacks weaken the argument against hiding usernames.