Skip to content

Commit

Permalink
fix: reject utf8 emails in transactional endpoint (#2270)
Browse files Browse the repository at this point in the history
Co-authored-by: KishenKumarrrrr <kishen@open.gov.sg>
  • Loading branch information
KishenKumarrrrr and KishenKumarrrrr committed Aug 7, 2024
1 parent 74d6f64 commit 6fff8b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/email/routes/email-transactional.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 6fff8b5

Please sign in to comment.