fix: checking normalized emails rather than user input

This commit is contained in:
Grégoire Cutzach 2024-10-16 09:42:22 +02:00
parent 32785609f5
commit f63bb15247
No known key found for this signature in database
GPG Key ID: AA4155BE23C375E6

View File

@ -638,7 +638,7 @@ export class UsersManager {
emailUsers.set(user.loginEmail, user);
}
emails.forEach((email) => {
const userIdAffected = emailUsers.get(email)!.id;
const userIdAffected = emailUsers.get(normalizeEmail(email))!.id;
// Org-level sharing with everyone would allow serious spamming - forbid it.
if (emailMap[email] !== null && // allow removing anything
userId !== this.getSupportUserId() && // allow support user latitude