-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email Validation Hangs at 100% CPU usage #2580
Comments
Here is another example
|
This was referenced Sep 19, 2023
This is definitely a big issue. Can we replace the email regex with one of those 2 which are described in the first post? |
Fixed by #2824 Landed in Zod v3.22.3 |
7 tasks
istarkov
added a commit
to webstudio-is/webstudio
that referenced
this issue
Mar 12, 2024
## Description fixes email validation hangs colinhacks/zod#2580 ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I came across an issue with the email validation for a specific input string (a long and complex email address).
When attempting to validate/parse the string, the process immediately goes to 100% CPU usage, and never actually finishes parsing. I have waited for ~15 minutes max.
Here's some code to reproduce, which also shows 2 other RegExes for which the problem doesn't occur:
Using Zod
v3.21.4
on a 2023 M2 Macbook Pro
The text was updated successfully, but these errors were encountered: