From: <be...@us...> - 2013-03-08 06:41:34
|
Revision: 11183 http://sourceforge.net/p/xoops/svn/11183 Author: beckmi Date: 2013-03-08 06:41:32 +0000 (Fri, 08 Mar 2013) Log Message: ----------- replacing ereg with preg_match in userutility.php (pmartina/paul) Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt XoopsCore/branches/2.5.x/2.5.6/htdocs/class/userutility.php Modified: XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt 2013-03-08 05:28:10 UTC (rev 11182) +++ XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt 2013-03-08 06:41:32 UTC (rev 11183) @@ -10,6 +10,7 @@ - number of users when "all groups" selected was wrong (tatane/mamba) - fix for potential lack of rendering css and javascript in Installer on the last screen (culex) - fix for missing Protector logo under PHP 5.4 (mamba) + - replacing ereg with preg_match in userutility.php (pmartina/paul) Security fixes - XSS/CSRF vulnerability in system/admin/groupperm.php (Dingjie Yang,Qualys/trabis) Modified: XoopsCore/branches/2.5.x/2.5.6/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.6/htdocs/class/userutility.php 2013-03-08 05:28:10 UTC (rev 11182) +++ XoopsCore/branches/2.5.x/2.5.6/htdocs/class/userutility.php 2013-03-08 06:41:32 UTC (rev 11183) @@ -239,7 +239,7 @@ if (!empty($_SERVER['HTTP_COMING_FROM'])) { $proxy_ip = $_SERVER['HTTP_COMING_FROM']; } - if (!empty($proxy_ip) && $is_ip = ereg('^([0-9]{1,3}\.){3,3}[0-9]{1,3}', $proxy_ip, $regs) && count($regs) > 0) { + if (!empty($proxy_ip) && $is_ip = preg_match('/^([0-9]{1,3}.){3,3}[0-9]{1,3}/', $proxy_ip, $regs) && count($regs) > 0) { $the_IP = $regs[0]; } else { $the_IP = $_SERVER['REMOTE_ADDR']; |