1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 08:12:17 +02:00

[ticket/15852] Fix whois for IPv6 addresses

PHPBB3-15852
This commit is contained in:
kasimi 2018-10-20 11:05:04 +02:00
parent c4ff772c91
commit 7263f9bebd
No known key found for this signature in database
GPG Key ID: 3163AB573241193A

View File

@ -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)))