ZF-5010: Zend_Validate_EmailAddress fails to reject certain invalid email addresses

Issue Type: Bug Created: 2008-11-20T10:08:18.000+0000 Last Updated: 2008-12-21T06:39:27.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)

Reporter: Travis Pew (travisp) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


According to RFC 2822 (Section 3.2.4) - [], The local part of an e-mail address may consist of alphabetic and numeric characters, and the following characters: !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } and ~, possibly with dot separators (.), inside, but not at the start, end or next to another dot separator: {quote}dot-atom-text = 1_atext *("." 1_atext){quote}

The expression used in Zend_Validate_EmailAddress misses the "next to another dot separator" part. For example, the following e-mail address validates:

Further, according to RFC 2821 (Section - [], {quote}The maximum total length of a user name or other local-part is 64 characters.{quote}

An email address with 65 characters in the local part validates.


Posted by Thomas Weidner (thomas) on 2008-12-08T12:22:49.000+0000

The second is no longer true.

Email addresses with more than 64 chars in the local part and more then 255 chars in the hostname part are no longer valid.

Posted by Thomas Weidner (thomas) on 2008-12-14T12:30:18.000+0000

Fixed with r13253

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.