1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 04:20:32 +02:00

[ticket/16188] Remove some legacy code and fix bug

PHPBB3-16189
This commit is contained in:
rubencm
2019-10-24 20:03:32 +00:00
parent f09f5bc51c
commit b6a99e7dca
6 changed files with 8 additions and 90 deletions

View File

@@ -1455,12 +1455,7 @@ function user_unban($mode, $ban)
*/
function user_ipwhois($ip)
{
if (empty($ip))
{
return '';
}
if (!preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
if (!filter_var($ip, FILTER_VALIDATE_IP))
{
return '';
}