diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-07-23 12:48:01 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-07-23 12:48:01 +0200 |
| commit | e5d5d581727ce61e653fdfc9a30effb69799aac5 (patch) | |
| tree | b617619946adb521817d602a09d491cbbe8e0989 /phpBB/install/database_update.php | |
| parent | fc25fe694afdab683789c9ed962c77558f85796c (diff) | |
| download | forums-e5d5d581727ce61e653fdfc9a30effb69799aac5.tar forums-e5d5d581727ce61e653fdfc9a30effb69799aac5.tar.gz forums-e5d5d581727ce61e653fdfc9a30effb69799aac5.tar.bz2 forums-e5d5d581727ce61e653fdfc9a30effb69799aac5.tar.xz forums-e5d5d581727ce61e653fdfc9a30effb69799aac5.zip | |
[ticket/9091] Extract IPv4 address from addresses mapped into IPv6.
PHPBB3-9091
Diffstat (limited to 'phpBB/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 1 |
1 files changed, 1 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 . " |
