diff --git a/CHANGELOG b/CHANGELOG index 4fa2ad465..2d1ef7e7d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -56,6 +56,7 @@ CHANGELOG Roundcube Webmail - Fix handling of empty entries in vCard import (#6564) - Fix bug in parsing some IMAP command responses that include unsolicited replies (#6577) - Fix PHP 7.2 compatibility in debug_logger plugin (#6586) +- Fix so ANY record is not used for email domain validation, use A, MX, CNAME, AAAA instead (#6581) RELEASE 1.4-beta ---------------- diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 0cfb4572c..95e2897cb 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -123,18 +123,16 @@ class rcube_utils $rcube = rcube::get_instance(); - if (!$dns_check || !$rcube->config->get('email_dns_check')) { + if (!$dns_check || !function_exists('checkdnsrr') || !$rcube->config->get('email_dns_check')) { return true; } - // find MX record(s) - if (!function_exists('getmxrr') || getmxrr($domain_part, $mx_records)) { - return true; - } - - // find any DNS record - if (!function_exists('checkdnsrr') || checkdnsrr($domain_part, 'ANY')) { - return true; + // Check DNS record(s) + // Note: We can't use ANY (#6581) + foreach (array('A', 'MX', 'CNAME', 'AAAA') as $type) { + if (checkdnsrr($domain_part, $type)) { + return true; + } } }