From 933e5512ddcae69133bb96e46f7d10d759ccb44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 4 Apr 2022 13:39:16 +0200 Subject: [PATCH] Convert IDNs to punycode before searching the lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/php/queryads.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/php/queryads.php b/scripts/pi-hole/php/queryads.php index 535dc146..9818f269 100644 --- a/scripts/pi-hole/php/queryads.php +++ b/scripts/pi-hole/php/queryads.php @@ -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(); } }