Zend Framework

Zend_Validate_EmailAddress: 'mx' option is ignored

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.10.0, 1.10.1
  • Fix Version/s: 1.10.2
  • Component/s: Zend_Validate
  • Labels:
    None

Description

The 'mx' option of Zend_Validate_EmailAddress is practically ignored. It only has any effect, if 'deep' is set to true. More precisely, the private method '_validateMXRecords' does nothing and always returns true when 'deep' is false. This defect seems to have been introduced with r18050.

Not strictly related and perhaps my understanding of these issues is insufficient, but to me the documented behaviour of 'deep' and the implemented behaviour (again, in '_validateMXRecords') seems to be contradictory.

Lastly, I just noticed that the bug I'm reporting is captured by the unit test Zend_Validate_EmailAddressTest::testMXRecords if only one enables TESTS_ZEND_VALIDATE_ONLINE_ENABLED – by default the test is skipped.

Activity

Hide
Michael Rehbein added a comment -

Patch contains:

  • Fix to library to correct for failed unit test
  • Adjusted test email addresses in the test to use different test domains. Including using
    rfc2606 example domains for the Bad email domains. http://www.rfc-editor.org/rfc/rfc2606.txt
Show
Michael Rehbein added a comment - Patch contains:
  • Fix to library to correct for failed unit test
  • Adjusted test email addresses in the test to use different test domains. Including using rfc2606 example domains for the Bad email domains. http://www.rfc-editor.org/rfc/rfc2606.txt
Hide
Thomas Weidner added a comment -

Fixed with r21083

Show
Thomas Weidner added a comment - Fixed with r21083

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: