From 5845b2285b726319d385b45dffac70c2857f2628 Mon Sep 17 00:00:00 2001 From: Kan-A-Pesh Date: Sun, 1 Dec 2024 13:50:27 +0100 Subject: [PATCH] fix: missing dot in email parsing --- routes/auth/send-mail.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/auth/send-mail.ts b/routes/auth/send-mail.ts index 5e0d092..f53bddf 100644 --- a/routes/auth/send-mail.ts +++ b/routes/auth/send-mail.ts @@ -43,7 +43,7 @@ export default async function Route_Auth_Sendmail(req: Request, res: Response, n const parsedEmail = bodyPayload.data.email.toLowerCase().replace(/\+.*@/g, "@"); if (!isAdmin(req)) { - if (/^[a-zA-Z0-9_-]+@edu\.devinci\.fr$/.test(parsedEmail) === false) { + if (/^[a-zA-Z0-9_.-]+@edu\.devinci\.fr$/.test(parsedEmail) === false) { return Status.send(req, next, { status: 400, error: "errors.auth.invalid.email"