aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php1
-rw-r--r--phpBB/install/install_install.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 83bbbf4577..4524dd20bf 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -119,6 +119,7 @@ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
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;
$sql = "SELECT config_value
FROM " . CONFIG_TABLE . "
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 4c22db07b2..2800c26609 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1236,6 +1236,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;
if ($data['script_path'] !== '/')
{