From 163aac74dbe500eac223ea2ebdbce0a76c1d6ab4 Mon Sep 17 00:00:00 2001 From: rubencm Date: Thu, 31 Oct 2019 20:54:21 +0000 Subject: [ticket/16190] Deprecate phpbb's checkdnsrr wrapper PHPBB3-16190 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index e0b6a9d0c6..7dd850111e 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1910,7 +1910,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'; } -- cgit v1.2.1 From b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1 Mon Sep 17 00:00:00 2001 From: rubencm Date: Thu, 24 Oct 2019 20:03:32 +0000 Subject: [ticket/16188] Remove some legacy code and fix bug PHPBB3-16189 --- phpBB/includes/functions_user.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 7dd850111e..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 ''; } -- cgit v1.2.1 From 9872316cac4df4987fdabc9512ca6ebeb7e5e04f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 18 Nov 2019 21:06:00 +0100 Subject: [ticket/16167] Remove uses of user_email_hash PHPBB3-16167 --- phpBB/includes/functions_user.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 5c94a90d9d..dc6e09268a 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -204,7 +204,6 @@ function user_add($user_row, $cp_data = false, $notifications_data = null) 'username_clean' => $username_clean, 'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '', 'user_email' => strtolower($user_row['user_email']), - 'user_email_hash' => phpbb_email_hash($user_row['user_email']), 'group_id' => $user_row['group_id'], 'user_type' => $user_row['user_type'], ); @@ -1948,9 +1947,9 @@ function validate_user_email($email, $allowed_email = false) if (!$config['allow_emailreuse']) { - $sql = 'SELECT user_email_hash + $sql = 'SELECT user_email FROM ' . USERS_TABLE . " - WHERE user_email_hash = " . $db->sql_escape(phpbb_email_hash($email)); + WHERE user_email = '" . $db->sql_escape($email) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); -- cgit v1.2.1