Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Requiring unique email addresses while protecting the privacy of your users?

Tags:

security

I setup my website to require unique email addresses (no two users can have the same email address), but I realized that this could allow someone to check if a person is registered on my website by attempting to signup with that email. Granted that this person would have to know the email address they wanted to try, but it could be useful information for some people (e.g. competitors who wanted to see if their users are registered on my website).

Is there any real way to stop this, or does this just have to be accepted as a possibility?

Edit: just to be clear, this is about creating an account. Even you provide a generic "invalid login" for bad logins, how would you require a unique email address or username without disclosing which usernames or email addresses are valid?

Additional, much later edit: One thing that wasn't considered here was maintaining the requirement for unique email addresses when you let users change their email address after account creation. Here, the solution I accepted of sending a "forgot password" email doesn't work nearly as well. Instead, it seems that the only options are to use captchas or limitations on the number of times an email address can be changed in a certain period of time to limit automated attempts.

like image 477
travis-146 Avatar asked Jun 28 '09 18:06

travis-146


People also ask

What are the unique emails?

What is a unique email address? A unique email address is an email that only you can access (i.e. is not shared with other people). You may use your personal email address or a business email address.

Should you use different email addresses?

Some experts say having more than one can better safeguard your personal and financial information from sticky-fingered cybercriminals. You might have separate accounts for financial matters, family and friends, online shopping, newsletter subscriptions, and so on.

How many email addresses should I have for security?

So, to better protect your identity I recommend having more than one personal email address. And in reality, I recommend a minimum of three of them.

Is it OK to have more than one email address?

Email accounts are easy to set up and there's no limit to how many you can have. Rather than slowing down communication and processes, having more than one email address can actually speed them up.


2 Answers

If someone tries to sign up with an existing account — send a "Change your password" email instead of a "New account" email (and explain why).

Leave the HTTP response as a simple "A confirmation email has been sent to the address you specified. Follow the instructions in it to continue".

like image 138
Quentin Avatar answered Oct 23 '22 10:10

Quentin


I suppose the issue is if someone forgets their password, you would ask them to enter their email address and you would send the password there if a match was found?

For that you can have users supply a question/answer challenge when they register their email address. Its a bigger pain for your users but if security is a concern then they may go for it.

Another possibility is your registration form. In this case users can enter an email address to see if its already "taken".

To address your concern you should just happily accept all registrations and send a confirmation email, even if they are already registered. That way the user doesn't know if they just registered the email address for the first time or not.

Finally, if an incorrect username/password is given, don't tell the user which is bad.

I don't think it's a terrible security risk unless membership to the site is sensitive, in which case you can use some of the patterns described.

like image 27
Dusty Pearce Avatar answered Oct 23 '22 12:10

Dusty Pearce