[phpMP-CVS] CVS: phpMP/core sessions.php,1.4,1.5
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2003-09-22 10:23:31
|
Update of /cvsroot/phpmp/phpMP/core In directory sc8-pr-cvs1:/tmp/cvs-serv22470/core Modified Files: sessions.php Log Message: Another oops. Index: sessions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/core/sessions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sessions.php 22 Sep 2003 10:13:06 -0000 1.4 --- sessions.php 22 Sep 2003 10:23:27 -0000 1.5 *************** *** 252,256 **** function _sess_ip_encoded() { ! $this->ip = $_SERVER['REMOTE_ADDR']; if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) --- 252,256 ---- function _sess_ip_encoded() { ! $ip = $_SERVER['REMOTE_ADDR']; if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) *************** *** 259,265 **** { $private_ip = array('#^0\.#', '#^127\.0\.0\.1#', '#^192\.168\.#', '#^172\.16\.#', '#^10\.#', '#^224\.#', '#^240\.#'); ! $this->ip = preg_replace($private_ip, $this->ip, $ip_list[1]); } } } --- 259,267 ---- { $private_ip = array('#^0\.#', '#^127\.0\.0\.1#', '#^192\.168\.#', '#^172\.16\.#', '#^10\.#', '#^224\.#', '#^240\.#'); ! $ip = preg_replace($private_ip, $ip, $ip_list[1]); } } + + return $ip; } |