From ad78f21bc1b222f790786bbb95439315ebe0d457 Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Thu, 30 Jan 2003 02:05:57 +0000 Subject: [PATCH] Corrected regular expression. Reported by Bobe. git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3410 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/common.php b/phpBB/common.php index 1026b22a55..4eeadf06da 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -154,8 +154,13 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' ) if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) { +<<<<<<< common.php + $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/'); + $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); +======= $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10.\.*/', '/^224.\.*/', '/^240.\.*/'); $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); +>>>>>>> 1.74.2.5 } } else