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(permutation): filter permutations by valid tld #71

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Conversation

JuxhinDB
Copy link
Collaborator

During Domain initialization we are validating whether or not the fqdn passed is a valid domain. Prior to this patch it would also accept structurally valid domains, which have invalid tlds (e.g., ęxamplę.čom).

This patch adds a bst search on the TLDS constant that we build at compile-time to check that it's a valid tld as well.

During `Domain` initialization we are validating whether
or not the fqdn passed is a valid domain. Prior to this
patch it would also accept structurally valid domains,
which have invalid tlds (e.g., ęxamplę.čom).

This patch adds a bst search on the `TLDS` constant that
we build at compile-time to check that it's a valid tld
as well.
@JuxhinDB JuxhinDB added the bug Something isn't working label Aug 13, 2024
@JuxhinDB JuxhinDB self-assigned this Aug 13, 2024
Not really pretty but the current `TLDS` only focuses on
root-level tlds (e.g., `.uk` but not `.ac.uk`).

* Add an `EXTENDED_TLDS` const which includes all variants
  of these TLDs. This is then applied to the filtering when
  creating Domains;
* Move `TLDS` creation from build-time to a const slice
@JuxhinDB JuxhinDB merged commit 5becbe5 into main Aug 13, 2024
1 check passed
@JuxhinDB JuxhinDB deleted the fix/tld-filtering branch August 13, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant