Skip to content

Conversation

deepanshu2506
Copy link
Contributor

@deepanshu2506 deepanshu2506 commented Oct 2, 2021

check the whitelist before checking if URL is a IP or FQDN.

resolves #1731

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@codecov
Copy link

codecov bot commented Oct 2, 2021

Codecov Report

Merging #1748 (2293c1d) into master (c899b31) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1748   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2015      2029   +14     
  Branches       454       457    +3     
=========================================
+ Hits          2015      2029   +14     
Impacted Files Coverage Δ
src/lib/isURL.js 100.00% <100.00%> (ø)
src/lib/isEmail.js 100.00% <0.00%> (ø)
src/lib/isIdentityCard.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 c899b31...2293c1d. Read the comment docs.

@deepanshu2506
Copy link
Contributor Author

@tux-tn please review

fedeci
fedeci previously approved these changes Oct 2, 2021
Copy link
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

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

Hello,
Thank you @deepanshu2506 for your PR ! Please address my comment and we should be good to go 👍
Is your contribution related to hacktoberfest ?

package.json Outdated
},
"license": "MIT"
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you revert your changes to package.json, i guess your code editor added a new line here !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll make the changes and yes my contribution is related to hacktoberfest

@tux-tn tux-tn added 🎉 first-pr 🧹 needs-update For PRs that need to be updated before landing labels Oct 2, 2021
@deepanshu2506
Copy link
Contributor Author

deepanshu2506 commented Oct 3, 2021

yes my contribution related to hacktoberfest

@deepanshu2506
Copy link
Contributor Author

@tux-tn I have addressed the required changes.

Copy link
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

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

LGTM 🎉
Thank you for your PR.

@tux-tn tux-tn added ready-to-land For PRs that are reviewed and ready to be landed hacktoberfest-accepted and removed 🧹 needs-update For PRs that need to be updated before landing labels Oct 4, 2021
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.

LGTM, thanks for your contrib!

@profnandaa profnandaa merged commit 13651ea into validatorjs:master Oct 5, 2021
rohitnairtech added a commit to rohitnairtech/validator.js that referenced this pull request Oct 23, 2021
Copy link

@theroncross theroncross left a comment

Choose a reason for hiding this comment

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

A whitelist shouldn't be exclusive like this.

if (options.host_whitelist && checkHost(host, options.host_whitelist)) {
  return true;
}

is probably more what we want here.

Happy to open a PR if wanted.

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

Labels

🎉 first-pr hacktoberfest-accepted ready-to-land For PRs that are reviewed and ready to be landed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow localhost without adding require_tld:false

5 participants