[wp-trac] [WordPress Trac] #48951: email_too_short is not good email validation candidate

WordPress Trac noreply at wordpress.org
Thu Dec 12 14:23:07 UTC 2019


#48951: email_too_short is not good email validation candidate
--------------------------+-----------------------------
 Reporter:  dingo_d       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  trunk
 Severity:  normal        |   Keywords:  2nd-opinion
  Focuses:                |
--------------------------+-----------------------------
 Currently, both `is_email` and `sanitize_email` will invalidate/sanitize
 valid emails:

 {{{#!php
 'admin at mailserver1'
 'm at m'
 }}}

 Both are valid emails. ICANN just discourages using them.

 The problem comes when you work with decoupled WordPress, and the front
 end is using custom validation that allows such emails, but WordPress
 doesn't so you don't have consistent behavior. Plus this is just wrong, as
 the official specification allows such mails.

 https://en.wikipedia.org/wiki/Email_address#Valid_email_addresses

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48951>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list