Skip to content

perf: improve performance of toNumber, trim and trimEnd on large input strings#5065

Closed
falsyvalues wants to merge 1 commit intolodash:4.17from
falsyvalues:trim-perf
Closed

perf: improve performance of toNumber, trim and trimEnd on large input strings#5065
falsyvalues wants to merge 1 commit intolodash:4.17from
falsyvalues:trim-perf

Conversation

@falsyvalues
Copy link
Copy Markdown
Member

This PR address perf of end trimming based on /\s+$/ regex on large strings (~ 50kB).

bnjmnt4n pushed a commit that referenced this pull request Feb 20, 2021
…t strings

This prevents potential ReDoS attacks using `_.toNumber` and `_.trim*`
as potential attack vectors.

Closes #5065.
@bnjmnt4n
Copy link
Copy Markdown
Contributor

I've added a few tests, and merged in c4847eb.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

issue bankruptcy Closing the issue/PR to start fresh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants