mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Move validation functions into func.php and use the same validation in all cases.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+2
-1
@@ -11,6 +11,7 @@ header('Content-type: application/json');
|
||||
require("scripts/pi-hole/php/database.php");
|
||||
require("scripts/pi-hole/php/password.php");
|
||||
require("scripts/pi-hole/php/auth.php");
|
||||
require("scripts/pi-hole/php/func.php");
|
||||
check_cors();
|
||||
|
||||
// Set maximum execution time to 10 minutes
|
||||
@@ -31,7 +32,7 @@ function resolveHostname($clientip, $printIP)
|
||||
return $clientname;
|
||||
}
|
||||
|
||||
else if(filter_var($clientip, FILTER_VALIDATE_IP))
|
||||
else if(validIP($clientip))
|
||||
{
|
||||
// Get host name of client and convert to lower case
|
||||
$clientname = strtolower(gethostbyaddr($ipaddr));
|
||||
|
||||
Reference in New Issue
Block a user