mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
validate_ip bugfix
This commit is contained in:
parent
d5a11cbc76
commit
f64d190e54
@ -231,7 +231,7 @@ function validate_name($string) {
|
|||||||
// Checks if an IPv4(or localhost IPv6) address is valid
|
// Checks if an IPv4(or localhost IPv6) address is valid
|
||||||
function validate_ip($ip) {
|
function validate_ip($ip) {
|
||||||
$ipL = safeIp2Long($ip);
|
$ipL = safeIp2Long($ip);
|
||||||
$ipR = long2ip($ipL);
|
$ipR = long2ip((int)$ipL);
|
||||||
|
|
||||||
if ($ip === $ipR) {
|
if ($ip === $ipR) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user