From: Florent Bruneau Date: Sat, 7 Jun 2008 14:48:19 +0000 (+0200) Subject: Don't try to convert non-IP to uint. X-Git-Tag: core/1.0.0~123 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ba34dc615f6511353ee079dcaa7dbc08e3873f3f;p=platal.git Don't try to convert non-IP to uint. Signed-off-by: Florent Bruneau --- diff --git a/include/xorg.misc.inc.php b/include/xorg.misc.inc.php index b025e7a..eefbfb2 100644 --- a/include/xorg.misc.inc.php +++ b/include/xorg.misc.inc.php @@ -235,6 +235,9 @@ function make_forlife($prenom, $nom, $promo) function ip_to_uint($ip) { $part = explode('.', $ip); + if (count($part) != 4) { + return null; + } $v = 0; $fact = 0x1000000; for ($i = 0 ; $i < 4 ; ++$i) {