When adding an email address to an account, we check to see if someone else has already claimed that address, and show error "Email address already claimed". This can be a form of email address enumeration (finding out if someone else's email is in the system).
We should avoid that, and have the result on the page be the same whether the email is already claimed or not. The email that we send out to the address can be different (since only the real owner will get it). The email can say something like "You tried to add EMAIL to your SITE_NAME account, but it is already claimed by your USERNAME account. You should use that account instead, or remove that address from that account. If this was not you who attempted this, you can safely ignore this email".
We should also check to see if a claimed address belongs to a disabled user or not.
Log in to post a comment.