Merge pull request #2162 from pi-hole/idn

Convert IDNs to punycode before searching the lists
This commit is contained in:
Adam Warner
2022-04-04 16:46:48 +01:00
committed by GitHub

View File

@@ -26,10 +26,10 @@ function echoEvent($datatext) {
if(isset($_GET["domain"]))
{
// Is this a valid domain?
$url = $_GET["domain"];
$url = idn_to_ascii($_GET["domain"]);
if(!validDomain($url))
{
echoEvent("Invalid domain!");
echoEvent("$url is an invalid domain!");
die();
}
}