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

fix ReDOS in isEmail and isHSL #1651

Merged
merged 5 commits into from
Apr 20, 2021
Merged

Conversation

tux-tn
Copy link
Member

@tux-tn tux-tn commented Apr 19, 2021

This PR updates isEmail and isHSL in order to prevent ReDOS attack described in #1597 and #1598 without changing the behaviour of both validators.

mocha has also been updated to the latest version in order to prevent npm/yarn audit from displaying a warning (Mocha is used as a dev dependency, people using validator are not impacted)

Checklist

  • PR contains only changes related; no stray files, etc.

@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #1651 (f967d0a) into master (05ceb18) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1651   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          100       101    +1     
  Lines         1847      1854    +7     
=========================================
+ Hits          1847      1854    +7     
Impacted Files Coverage Δ
src/lib/isEmail.js 100.00% <100.00%> (ø)
src/lib/isHSL.js 100.00% <100.00%> (ø)
src/lib/isIBAN.js 100.00% <0.00%> (ø)
src/lib/isMobilePhone.js 100.00% <0.00%> (ø)
src/lib/isPassportNumber.js 100.00% <0.00%> (ø)
src/lib/util/typeOf.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05ceb18...f967d0a. Read the comment docs.

Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this in! LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants