Skip to content

Commit

Permalink
Disallow IDNA ACE format
Browse files Browse the repository at this point in the history
  • Loading branch information
solcloud authored Dec 2, 2021
1 parent 8328978 commit 45afbcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Doh.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public function resolve(string $domain, int $type): ?string
if (!preg_match('~^[-.a-z0-9]+$~', $domain)) {
return $this->dd("Use ascii");
}
if (strpos($domain, 'xn--') !== false) {
return $this->dd("No to IDNA punycode");
}

$cacheHit = $this->cacheGet($domain, $type);
if ($cacheHit) {
Expand Down

0 comments on commit 45afbcb

Please sign in to comment.