-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply +-normalization for all email domains #16764
base: master
Are you sure you want to change the base?
Conversation
migration script added, think this is ready for review |
actually, just realized this migration script is wrong because it would undo previous normalizations since it starts from the verbatim email. I guess the right solution is not to create a new script like I did here, but to modify the old script to do all normalization at once. Will fix. |
fixed |
I don't expect the migration script to run smoothly because db.user4.createIndex({ email: 1 }, { unique: true, sparse: 1 }); and removing the |
should we just try/catch the update and ignore the rejected duplicates? |
Draft PR because this only changes the code part and does not include anything for database migrations, because I'm not sure what's the best way to write that and how to deal with potential collisions caused by them.
Zulip context topic
Prior to this commit,
+
- and.
-normalization are only applied to Gmail/ProtonMail. However, using the+
for aliasing is done by many more email providers. This commit therefore applies+
-normalization to all email domains - I don't think there's any risk in doing that. Removing the dots, however, is still only done for Gmail and ProtonMail because there are email providers (I'm thinking of Outlook here, and there might be others) where dots can absolutely not be ignored.