Conversation
Is there a reason why we can't use the built-in |
We certainly could. it would be a nice performance improvement for those running node >=10 I think using the built-in I do think it's more likely to be an improvement than a regression. I would hoever advocate for making it a different release where consumers can roll back on the |
|
Thanks @OlafConijn ! I'm merging and publishing this fix now. |
# [1.16.0](v1.15.0...v1.16.0) (2023-12-04) ### Upgrade * Bump word-wrap from 1.2.3 to 1.2.5 (#516) ([9c9251b](9c9251b)), closes [#516](#516) [jonschlinkert/word-wrap#24](jonschlinkert/word-wrap#24) [jonschlinkert/word-wrap#41](jonschlinkert/word-wrap#41) [jonschlinkert/word-wrap#33](jonschlinkert/word-wrap#33) [jonschlinkert/word-wrap#42](jonschlinkert/word-wrap#42) [jonschlinkert/word-wrap#24](jonschlinkert/word-wrap#24) [jonschlinkert/word-wrap#41](jonschlinkert/word-wrap#41) [jonschlinkert/word-wrap#33](jonschlinkert/word-wrap#33) [#42](#42) [#41](#41)
|
Download |
Fixes #32
CVE-2023-26115
TLDR; ReDoS, the issue is due to Regex matching algo.
This PR proposes an alternative solution to #33 in which:
string.prototype.trimEndis not used, as this would break when ran on older nodejs runtimes./\s+$/gm).Performance:
trimEndis slower compared to nativestring.prototype.trimEnd.trimEndfunction however is comparable to the original regular expression.results here