Closed perdedora closed 1 year ago
The current implementation only works when an ip is less than 31 characters, if the ip exceed 31 characters, the function returns true
Test code:
$ip[] = 'FRwJzgDIOhfekjtPqFzobWAyZ2Z3Dma'; // valid ip (31 chars). function returns true $ip[] = 'FRwJzgDIOhfekjdddtPqFzobWAyZ2Z3Dma'; // invalid ip (34 chars). function returns true $ip[] = 'FRwJzgDIOhfekPqFzobWAyZ2Z3Dma'; // invalid ip (29 chars). function returns false foreach($ip as $i) var_dump(validate_ip_string($i));
The current implementation only works when an ip is less than 31 characters, if the ip exceed 31 characters, the function returns true
Test code: