ZF-11930: Validate emailaddress that hasn't "MX" records but it has "A" record with option "deep" => TRUE, never checks records "A", "AAAA" , "A6"

Issue Type: Bug Created: 2011-12-08T17:41:19.000+0000 Last Updated: 2012-02-26T19:02:10.000+0000 Status: Open Fix version(s): Reporter: José Luis Martínez de la Riva Manzano ( Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

  • emailaddresses
  • zf-crteam-review

Related issues: Attachments:


Steps: 1. Create a validator emailaddress. (Same as second example on…)

$validator = new Zend_Validate_EmailAddress( array( 'allow' => Zend_Validate_Hostname::ALLOW_DNS, 'mx' => true, 'deep' => true ) );

  1. Use an email which MX records returns FALSE but can provide "A" record. Then isValid() always return FALSE.


TIP: On file "Zend/ValidateEmailAddress.php" function line 442: Function "getmxrr" always return false because there is no "MX" records, and then never executes the code that checks the "A", "AAAA", "A6" records.

private function _validateMXRecords() { $mxHosts = array(); $result = getmxrr($this->_hostname, $mxHosts); if (!$result) { $this->_error(self::INVALID_MX_RECORD); } else if ($this->_options['deep'] && function_exists('checkdnsrr')) { // ...


Posted by Adam Lundrigan (adamlundrigan) on 2012-02-26T19:02:03.000+0000

Is this something that can be fixed for ZF v1.12?

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.