Summary
The Account/Identity modules let one mailbox register several accounts, even with RequireUniqueEmail enabled. The unique-email check runs on NormalizedEmail, and the default ILookupNormalizer only upper-cases the address. Addresses that are different strings but go to the same mailbox are therefore treated as different users.
Environment
Observed on an ABP Commercial application:
- Angular UI, separated auth server, LeptonX theme
- Built-in
Volo.Abp.Account.Public.WebRegister page (RegisterModel), no custom registration code Abp.Account.IsSelfRegistrationEnabled = trueAbp.Identity.SignIn.RequireEmailVerificationToRegister = trueAbp.Account.Captcha.UseCaptchaOnRegistration = false
Email verification does not prevent this: each alias's verification mail lands in the same inbox and is confirmed there. Captcha would only slow down automated sign-ups. It would not stop one person from opening several accounts by hand.
Examples (all delivered to the same inbox)
- Plus addressing / subaddressing (RFC 5233):
name+anything@domain.comgoes toname@domain.com. Gmail, Outlook/Hotmail, iCloud, Proton, Fastmail and most corporate mail servers support it. - Gmail ignores dots in the local part:
first.last@gmail.com=firstlast@gmail.com(also ongooglemail.com).
Impact
- One person can create an unlimited number of accounts with a single mailbox (multi-accounting).
- Any per-account limit (free trial, quota, credits) can easily be bypassed.
- User and sign-up statistics are inflated.
Steps to reproduce
- On an ABP application with self-registration and email verification enabled, register with
firstlast@gmail.comand verify it. - Register with
first.last@gmail.com. The verification mail arrives in the same inbox. After verification, a second, separate account exists. - Register with
firstlast+test@gmail.com. This also creates a separate account.
Request
Please add email canonicalization to the unique-email check in the Account/Identity modules, as a built-in option that applications can turn on or off (for example IdentityOptions.User.CanonicalizeEmail or an Account setting). The canonical form should be built as follows:
- Trim and lower-case the whole address.
- Remove
+and everything after it in the local part, for all domains. - For
gmail.com/googlemail.comonly, remove dots from the local part and treatgooglemail.comasgmail.com. Dots are significant on other domains, so this rule must not apply to them.
The address the user typed must still be stored and used for sending mail. Only the uniqueness check uses the canonical form. Login by email, email login links, email confirmation and password reset must keep working with the address the user registered.