by pornel · 15y ago · 0 comments
Invalid login attempts (for any reason) should return the generic error message:
The username or password you entered is not valid
In practice, on any non-trivial website, it doesn't make a difference for security.Registration form will show a specific error when you try to register username that is already taken. Password reminder form will show error when you request reminder for an unknown e-mail. Some websites even have AJAX APIs for checking validity of usernames/emails!
Because of that it's easy for an attacker to check whether username or password is invalid. Vague error messages make it only hard for the user.
I wonder how many emails scrapers have done of Forgotten Email pages.
2) Send a non-blocking request with a flag, eg "Good" "Bad".
3) Return message to user that email has been sent but can not confirm if the email is true for privacy reasons.
While yes, it can be down to a timing attack, the trouble is that this vector can be used against sessions, logins, etc. It can be a standard that Mozilla should adopt.
a correct site - and I have corrected dozen of them, and they work just fine does not give a specific error msg for password reminders either, or any other function.
so the generic message should be returned from every such function, and i'm pretty sure they talk about password recovery as well. (and again ANY such function should return a generic message)
mind you, its much easier to compromise a site when you can check the username and just have to crack the password. you can automate it easily as well.
ps: oh, look,next paragraph after what you pasted: "The following message should be returned to the user regardless if the username or email address is valid:" for recovery. Pretty sure you've seen it and voluntarily ignored it :-( mean mean mean.
If you don't want to use a CAPTCHA for regular signups, you can add one to the page dynamically when you see multiple registrations from the same IP address.
What about sites that let the user know his username is already taken using AJAX? Should this be avoided too?
I like zobzu's idea of using an email as login, though.
Of course, the downside is that you're slowing the user down. It's acceptable for the sites that choose to require valid email addresses: if you're going to go there you might as well get it done sooner.
You'd also be spamming potential victims, but that may not be that bad, as you'd also be alerting them.
EDIT: oops meant this to be a reply to the GP.
and if thats too annoying to implement use browserid.org