keat Posted February 16, 2016 Share Posted February 16, 2016 I found this in my error logs today. Looks like it's been ongoing for a while, and I guess it's related to the security suite. [Deprecated] /home/xxxxxxxxx/public_html/v6cart/modules/plugins/ccss/ccss.class.php:239 - Function split() is deprecated CubeCart Version 6.0.10 PHP Version 5.3.29 MySQL Version 5.5.47 Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 16, 2016 Share Posted February 16, 2016 Can you verify the version of this plugin you have installed? I am looking at version 1.0.0 and there is no line 239. Quote Link to comment Share on other sites More sharing options...
keat Posted February 16, 2016 Author Share Posted February 16, 2016 Having delved a little deeper, i think it's related to the dynamic IP thing we were playing with over the weekend. list ($net, $mask) = split ("/", $CIDR); // $mask is empty if not in CIDR notation Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 16, 2016 Share Posted February 16, 2016 Just fetched version 1.0.6 and there is no line 239 in that version either. Quote Link to comment Share on other sites More sharing options...
keat Posted February 16, 2016 Author Share Posted February 16, 2016 ccss.class.php I found the version number and it is 1.06 Right at the end of the file. private function _ipCIDRCheck ($IP, $CIDR) { list ($net, $mask) = split ("/", $CIDR); // $mask is empty if not in CIDR notation $ip_net = ip2long ($net); $mask = (!empty($mask)) ? $mask : 32; // force CIDR /32 if empty $mask $ip_mask = ~((1 << (32 - $mask)) - 1); $ip_ip = ip2long ($IP); $ip_ip_net = $ip_ip & $ip_mask; return ($ip_ip_net == $ip_net); } } ?> Quote Link to comment Share on other sites More sharing options...
keat Posted February 16, 2016 Author Share Posted February 16, 2016 I've replaced split with explode and see what happens. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 16, 2016 Share Posted February 16, 2016 Oh! That's the hack to allow for CIDR notation. explode() should work. On the other hand, I now read that list() will error if the resulting array from explode() (or split) is less than the two elements list() is expecting. So: private function _ipCIDRCheck($IP, $CIDR) { list($net, $mask) = array_pad(explode("/", $CIDR),2,''); // $mask will be empty if not in CIDR notation $ip_net = ip2long($net); $mask = (!empty($mask)) ? $mask : 32; // force CIDR /32 if empty $mask $ip_mask = ~((1 << (32 - $mask)) - 1); $ip_ip = ip2long($IP); $ip_ip_net = $ip_ip & $ip_mask; return ($ip_ip_net == $ip_net); } Quote Link to comment Share on other sites More sharing options...
keat Posted February 16, 2016 Author Share Posted February 16, 2016 I couldn't log in until I figured } ?> might be missing Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.