Skip to content

Commit

Permalink
Merge pull request #24 from resohead/patch-1
Browse files Browse the repository at this point in the history
Prevent eager matching of tld
  • Loading branch information
freekmurze authored Mar 14, 2023
2 parents 21db738 + 8d7b307 commit d406306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RdapDns.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getServerForDomain(string $domain): ?string
$tlds = $tldServerProperties[0];

foreach ($tlds as $tld) {
if (str_ends_with($domain, $tld)) {
if (str_ends_with($domain, ".{$tld}")) {
return true;
}
}
Expand Down

0 comments on commit d406306

Please sign in to comment.