-
Notifications
You must be signed in to change notification settings - Fork 171
improv(logger): Updated the regex for getCodeLocation
to prevent regex exploit
#4389
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
Conversation
is this SonarCloud finding valid? |
Yes, I had accidentally left a duplicate bracket there. I've removed it now |
|
Summary
This PR updates the regex used by the function
getCodeLocation
to get the file and line number in the error stack trace. It prevent slow execution of regex when encountered with string starting with multiple occurrences of((
Changes
(
to the regex capture group to prevent matching series of((
Issue number: closes #4366
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.