🐛 prevent @googlemail.com trick

This commit is contained in:
Flam3rboy 2021-02-07 11:25:39 +01:00
parent ce07018e30
commit fb7c119bf1

View File

@ -231,7 +231,8 @@ export function adjustEmail(email: string) {
const domain = parts[5]; const domain = parts[5];
const user = parts[1]; const user = parts[1];
if (domain === "gmail.com") { // TODO: check accounts with uncommon email domains
if (domain === "gmail.com" || domain === "googlemail.com") {
// replace .dots and +alternatives -> Gmail Dot Trick https://support.google.com/mail/answer/7436150 and https://generator.email/blog/gmail-generator // replace .dots and +alternatives -> Gmail Dot Trick https://support.google.com/mail/answer/7436150 and https://generator.email/blog/gmail-generator
return user.replace(/[.]|(\+.*)/g, "") + "@gmail.com"; return user.replace(/[.]|(\+.*)/g, "") + "@gmail.com";
} }