diff options
author | kasimi <mail@kasimi.net> | 2018-10-20 11:05:04 +0200 |
---|---|---|
committer | kasimi <mail@kasimi.net> | 2018-10-20 11:05:04 +0200 |
commit | 7263f9bebda27707efa5a9960e8b9c63119f7cc2 (patch) | |
tree | 186fbca2775746932ee60807e39bc29bb5252e81 /phpBB/includes/functions_user.php | |
parent | c4ff772c911aa79abe41275c5cba4736763ea0c4 (diff) | |
download | forums-7263f9bebda27707efa5a9960e8b9c63119f7cc2.tar forums-7263f9bebda27707efa5a9960e8b9c63119f7cc2.tar.gz forums-7263f9bebda27707efa5a9960e8b9c63119f7cc2.tar.bz2 forums-7263f9bebda27707efa5a9960e8b9c63119f7cc2.tar.xz forums-7263f9bebda27707efa5a9960e8b9c63119f7cc2.zip |
[ticket/15852] Fix whois for IPv6 addresses
PHPBB3-15852
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 15 |
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))) |