From f2ab76da9a4f6818cc1ddc083f45dfd0a1c6394f Mon Sep 17 00:00:00 2001 From: KishenKumarrrrr Date: Wed, 7 Aug 2024 09:56:59 +0800 Subject: [PATCH] fix: reject utf8 emails in transactional endpoint --- backend/src/email/routes/email-transactional.routes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/email/routes/email-transactional.routes.ts b/backend/src/email/routes/email-transactional.routes.ts index ff930bd45..34e60cf35 100644 --- a/backend/src/email/routes/email-transactional.routes.ts +++ b/backend/src/email/routes/email-transactional.routes.ts @@ -24,7 +24,9 @@ export const InitEmailTransactionalRoute = ( const sendValidator = { [Segments.BODY]: Joi.object({ recipient: Joi.string() - .email() + .email({ + allowUnicode: false, + }) .options({ convert: true }) .lowercase() .required(),