Skip to content
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

fix(client): Fix exponenetial regexp in error formatting code #17907

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented Feb 13, 2023

In order to render the fancy error message, we try to find a known
prisma call in the source code. To do so, we use a reg exp, which turned
out to be of exponential complexity. To make matters worth, embedded
DMMF in client prior to 4.0.0 could actually trigger exponential
backgtracking by itself.

Fix #12355

@SevInf SevInf requested review from a team and aqrln and removed request for a team February 13, 2023 11:37
@SevInf SevInf changed the title y fix(client): Fix exponenetial regexp in error formatting code Feb 13, 2023
In order to render the fancy error message, we try to find a known
prisma call in the source code. To do so, we use a reg exp, which turned
out to be of exponential complexity. To make matters worth, embedded
DMMF in client prior to 4.0.0 could actually trigger exponential
backgtracking by itself.

Fix #12355
@SevInf SevInf added this to the 4.11.0 milestone Feb 13, 2023
@SevInf SevInf merged commit 77217a8 into main Mar 13, 2023
@SevInf SevInf deleted the fix/err-redos branch March 13, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prisma hangs when javascript is minified
2 participants