Skip to content

Commit

Permalink
🐎 regex vulnerability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriAlves5 committed Oct 25, 2023
1 parent 1b044fa commit 5f67b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 5f67b5d

Please sign in to comment.