Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Consider all domain suffixes for blacklisting and normalise implementations #54
This change was triggered by the Ruby implementation not matching any blacklisted domains with more than 1 subdomain, e.g.
This refactoring normalises the implementation across the 7 languages:
This removes false-negatives (e.g. where the domain includes > 2 subdomains) in some cases, and false-positives (e.g. where a blacklisted domain appears as a subdomain) in other cases.
As a side effect, several improvements were made to the tests of PHP, Python in particular, using standard libraries for unit testing rather than ad-hoc tests.
Meta: I think this will be easiest to review on a commit-by-commit basis. This PR is based off my other pending PR, so that PR's commit also shows up here.
added a commit
this pull request
Mar 18, 2016
You're welcome, thanks for maintaining the project!
How do we go about getting a new Ruby gem published? At work we're currently overriding
By the way, do you have any idea why