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: domain match routine #236

Merged
merged 1 commit into from Apr 21, 2022
Merged

fix: domain match routine #236

merged 1 commit into from Apr 21, 2022

Conversation

colincasey
Copy link
Contributor

The domain match routine can fail in cases where the domain suffix characters can be located in the string before the suffix. Changing the logic to use lastIndexOf instead of indexOf seems more appropriate for testing the suffix here.

Fixes #235

The domain match routine can fail in cases where the domain suffix characters can be located in the string before the suffix.

Changing the logic to use `lastIndexOf` instead of `indexOf` seems more appropriate for testing the suffix here.
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.

domainMatch() breaks for URLs with TLD in substring of subdomain
3 participants