From 5f67b5d05c4cf764eb24aebe133f00464923aee6 Mon Sep 17 00:00:00 2001 From: yuri alves Date: Wed, 25 Oct 2023 14:53:09 -0300 Subject: [PATCH] :racehorse: regex vulnerability fix --- src/pages/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Login.js b/src/pages/Login.js index 57880e58..0b322078 100644 --- a/src/pages/Login.js +++ b/src/pages/Login.js @@ -15,7 +15,7 @@ function Login() { let navigate = useNavigate(); function isValidEmail(email) { - return /\S+@\S+\.\S+/.test(email); + return /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/.test(email); } const handleChange = event => {