util: refactor to use primordials in debuglog#38756
util: refactor to use primordials in debuglog#38756marsonya wants to merge 1 commit intonodejs:masterfrom marsonya:primordials-lib-internal-util-debuglog
Conversation
| .replace(/,/g, '$|^') | ||
| .toUpperCase(); | ||
| debugEnv = StringPrototypeReplace(debugEnv, /[|\\{}()[\]^$+?.]/g, '\\$&'); | ||
| debugEnv = StringPrototypeReplace(debugEnv, /\*/g, '.*'); |
There was a problem hiding this comment.
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.
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.