aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-10-20 20:19:10 -0400
committerMarc Alexander <admin@m-a-styles.de>2018-10-20 20:19:10 -0400
commitae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3 (patch)
tree4d4024d37f56b0d2d5df3551ee77fe87707e46cc
parentd017b9aa3b38aa096383c0d532bedb79114d9b87 (diff)
parent7263f9bebda27707efa5a9960e8b9c63119f7cc2 (diff)
downloadforums-ae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3.tar
forums-ae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3.tar.gz
forums-ae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3.tar.bz2
forums-ae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3.tar.xz
forums-ae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3.zip
Merge pull request #5423 from kasimi/ticket/15852
[ticket/15852] Fix whois for IPv6 addresses
-rw-r--r--phpBB/includes/functions_user.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 2677916a7d..d019b867fa 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1429,21 +1429,14 @@ function user_ipwhois($ip)
return '';
}
- if (preg_match(get_preg_expression('ipv4'), $ip))
- {
- // IPv4 address
- $whois_host = 'whois.arin.net.';
- }
- else if (preg_match(get_preg_expression('ipv6'), $ip))
- {
- // IPv6 address
- $whois_host = 'whois.sixxs.net.';
- }
- else
+ if (!preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
{
return '';
}
+ // IPv4 & IPv6 addresses
+ $whois_host = 'whois.arin.net.';
+
$ipwhois = '';
if (($fsk = @fsockopen($whois_host, 43)))