Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

falsyvalues
Copy link
Contributor

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
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
Development

Successfully merging this pull request may close these issues.

None yet

4 participants