Skip to content

Commit

Permalink
Merge pull request #35 from La-404-Devinci/fix/email
Browse files Browse the repository at this point in the history
  • Loading branch information
Kan-A-Pesh authored Dec 1, 2024
2 parents e1ff5ed + a3df638 commit 4097377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/auth/send-mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4097377

Please sign in to comment.