[ticket/9746] Adding some more calls to phpbb_ip_normalise().

PHPBB3-9746
This commit is contained in:
Andreas Fischer 2010-08-03 11:41:01 +02:00
parent 5d01c58b77
commit 3c713b5e7d
3 changed files with 7 additions and 5 deletions

View file

@ -56,7 +56,7 @@ class acp_users
$this->page_title = 'WHOIS';
$this->tpl_name = 'simple_body';
$user_ip = request_var('user_ip', '');
$user_ip = phpbb_ip_normalise(request_var('user_ip', ''));
$domain = gethostbyaddr($user_ip);
$ipwhois = user_ipwhois($user_ip);

View file

@ -127,8 +127,11 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
$user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
$user->ip = (stripos($user->ip, '::ffff:') === 0) ? substr($user->ip, 7) : $user->ip;
$user->ip = '';
if (!empty($_SERVER['REMOTE_ADDR']))
{
$user->ip = (function_exists('phpbb_ip_normalise')) ? phpbb_ip_normalise($_SERVER['REMOTE_ADDR']) : htmlspecialchars($_SERVER['REMOTE_ADDR']);
}
$sql = "SELECT config_value
FROM " . CONFIG_TABLE . "

View file

@ -1235,8 +1235,7 @@ class install_install extends module
$current_time = time();
$user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
$user_ip = (stripos($user_ip, '::ffff:') === 0) ? substr($user_ip, 7) : $user_ip;
$user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? phpbb_ip_normalise($_SERVER['REMOTE_ADDR']) : '';
if ($data['script_path'] !== '/')
{