From 9b1f0ed38818cdd84f06617ee9ddaf2200032946 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 4 Jun 2003 17:41:40 +0000 Subject: [PATCH] Include 172.16/12 as private address space instead of 172.16/16. git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4079 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 3 ++- phpBB/docs/CHANGELOG.html | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/common.php b/phpBB/common.php index 49ef4e7fa2..e9e7600b10 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -137,8 +137,9 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' ) $entry = trim($entry); if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) ) { - $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/'); + $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/'); $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); + if ($client_ip != $found_ip) { $client_ip = $found_ip; diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 5c5427ea72..a93c3bc48f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -116,7 +116,6 @@ p,ul,td {font-size:10pt;}
  • Prevent registration if user is logged in or user trying to register a second time
  • Prevent usage of ALT-255 in Usernames
  • Fixed IP retrieval for users with two proxy setups while the first proxy is hiding the clients IP Address - cosmos
  • -
  • Fixed Cache-Control header for correctly resetting cookies - cosmos
  • 1.ii. Changes since 2.0.3