aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index e0b6a9d0c6..5c94a90d9d 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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 '';
}
@@ -1910,7 +1905,7 @@ function phpbb_validate_email($email, $config = null)
{
list(, $domain) = explode('@', $email);
- if (phpbb_checkdnsrr($domain, 'A') === false && phpbb_checkdnsrr($domain, 'MX') === false)
+ if (checkdnsrr($domain, 'A') === false && checkdnsrr($domain, 'MX') === false)
{
return 'DOMAIN_NO_MX_RECORD';
}