-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
util: refactor to use primordials in debuglog #38756
util: refactor to use primordials in debuglog #38756
Conversation
.replace(/,/g, '$|^') | ||
.toUpperCase(); | ||
debugEnv = StringPrototypeReplace(debugEnv, /[|\\{}()[\]^$+?.]/g, '\\$&'); | ||
debugEnv = StringPrototypeReplace(debugEnv, /\*/g, '.*'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should wait for V8 9.1 to land on master and use StringPrototypeReplaceAll
here instead, but non blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. StringPrototypeReplaceAll
would be the ideal thing here.
Do we proceed with the changes in this PR or close it for now?
Replace code that's vulnerable to Prototype Pollution with Primordials.
AFAICT, this part of code is run before any user code, so it's not at risk of prototype pollution. Maybe we could simply add a comment that states that prototype pollution is not a concern for this function. wdyt? |
Thanks for implementing the new PR. Your suggestion is the right solution to go ahead with. |
Replace code that's vulnerable to Prototype Pollution with Primordials.