wilde: server/php-kolab/Kolab_Filter/Filter Content.php,1.9,1.10

cvs at kolab.org cvs at kolab.org
Tue Apr 15 17:29:52 CEST 2008


Author: wilde

Update of /kolabrepository/server/php-kolab/Kolab_Filter/Filter
In directory doto:/tmp/cvs-serv6468

Modified Files:
	Content.php 
Log Message:
Fixed warning in match_ip() for networks defined as simple IPs.
See kolab/issue2466.


Index: Content.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Content.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Content.php	27 Feb 2008 07:09:56 -0000	1.9
+++ Content.php	15 Apr 2008 15:29:49 -0000	1.10
@@ -396,7 +396,7 @@
     $iplong = ip2long($ip);
     $cidr = explode("/", $network);
     $netiplong = ip2long($cidr[0]);
-    if ( $cidr[1] ) {
+    if ( count($cidr) == 2 ) {
         $iplong = $iplong & ( 0xffffffff << 32 - $cidr[1] );
         $netiplong = $netiplong & ( 0xffffffff << 32 - $cidr[1] );
     }





More information about the commits mailing list