1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[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

@@ -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 . "