From f63bb15247f9c325224dafa7e7b7c54aaadffbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Cutzach?= Date: Wed, 16 Oct 2024 09:42:22 +0200 Subject: [PATCH] fix: checking normalized emails rather than user input --- app/gen-server/lib/homedb/UsersManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/gen-server/lib/homedb/UsersManager.ts b/app/gen-server/lib/homedb/UsersManager.ts index 2f1418ac..d7fa907b 100644 --- a/app/gen-server/lib/homedb/UsersManager.ts +++ b/app/gen-server/lib/homedb/UsersManager.ts @@ -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