WebEngine's 6th Anniversary

On December 19th, 2018 we will be celebrating 6 years of WebEngine CMS!
The event is here!

IPV6 Block

Ch3ma

New Member
#1
Hi, in class.validator.php the function to check ip in regex only check support IPV4:

PHP:
public static function Ip($string){
        return (bool)preg_ match("/^(1?\d{1,2}|2([0-4]\d|5[0-5]))(\.(1?\d{1,2}|2([0-4]\d|5[0-5]))){3}$/", $string);
    }
That cause IPV6 web blocks.

To fix that, is better use the native function in php:

PHP:
public static function Ip($string){
        return filter_var($ip, FILTER_VALIDATE_IP);
    }
Lautaro can you please push this in the next update?
Thanks.

pd: excuse my english i speak spanish.
 
Top