From f64d190e546023251c464870975d80bb9331cf0c Mon Sep 17 00:00:00 2001 From: Znote Date: Wed, 15 Dec 2021 23:18:50 +0100 Subject: [PATCH] validate_ip bugfix --- engine/function/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/function/general.php b/engine/function/general.php index 76f090f..1f77f92 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -231,7 +231,7 @@ function validate_name($string) { // Checks if an IPv4(or localhost IPv6) address is valid function validate_ip($ip) { $ipL = safeIp2Long($ip); - $ipR = long2ip($ipL); + $ipR = long2ip((int)$ipL); if ($ip === $ipR) { return true;