From 34b6c3751624d615634dec0cbf7bb019ca2cc0c3 Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Thu, 11 Jan 2018 15:33:31 -0500 Subject: [PATCH] Fix IP check and allow host names in Top Clients filter Signed-off-by: Mark Drobnak --- scripts/pi-hole/php/savesettings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index a85b65ce..7b67ffed 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -320,9 +320,9 @@ function readAdlists() $first = true; foreach($clients as $client) { - if(!validIP($domain)) + if(!validDomainWildcard($client) && !validIP($client)) { - $error .= "Top Clients entry ".htmlspecialchars($client)." is invalid (use only IP addresses)!
"; + $error .= "Top Clients entry ".htmlspecialchars($client)." is invalid (use only host names and IP addresses)!
"; } if(!$first) {