diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 079d09ac94..5cbb3b4515 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3411,9 +3411,10 @@ function get_preg_expression($mode)
}
/**
-* Returns the first 4 blocks of the specified IPv6 address and as many
-* as specified in the length paramater additional ones.
+* Returns the first block of the specified IPv6 address and as many additional
+* ones as specified in the length paramater.
* If length is zero, then an empty string is returned.
+* If length is greater than 3 the complete IP will be returned
*/
function short_ipv6($ip, $length)
{
@@ -3432,7 +3433,10 @@ function short_ipv6($ip, $length)
{
$ip = '0000' . $ip;
}
- $ip = implode(':', array_slice(explode(':', $ip), 0, 4 + $length));
+ if ($length < 4)
+ {
+ $ip = implode(':', array_slice(explode(':', $ip), 0, 1 + $length));
+ }
return $ip;
}
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 9c8d1e9726..441cd9a164 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -357,7 +357,7 @@ $lang = array_merge($lang, array(
'FORWARDED_FOR_VALID' => 'Validated X_FORWARDED_FOR header',
'FORWARDED_FOR_VALID_EXPLAIN' => 'Sessions will only be continued if the sent X_FORWARDED_FOR header equals the one sent with the previous request. Bans will be checked against IPs in X_FORWARDED_FOR too.',
'IP_VALID' => 'Session IP validation',
- 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking. On IPv6 addresses A.B.C compares the first 7 blocks and A.B the first 6 blocks.',
+ 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking. On IPv6 addresses A.B.C compares the first 4 blocks and A.B the first 3 blocks.',
'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts',
'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).',
'NO_IP_VALIDATION' => 'None',