[wp-trac] [WordPress Trac] #39915: is_email_address_unsafe() throws notice for invalid email addresses

WordPress Trac noreply at wordpress.org
Mon Mar 6 19:14:42 UTC 2017


#39915: is_email_address_unsafe() throws notice for invalid email addresses
----------------------------------------+-------------------------
 Reporter:  ocean90                     |       Owner:  jeremyfelt
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  4.8
Component:  Users                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  multisite
----------------------------------------+-------------------------

Comment (by jeremyfelt):

 It looks like we can add some more test conditions to
 `is_email_address_unsafe()`. We test a lot of addresses based on matching
 the list of banned domains, but we don't cover the case of an invalid
 email address.

 > Not sure about `is_email_address_unsafe()`. Should the check be skipped
 if the email is invalid? Should it return true or false? Should we treat
 it as a domain only?

 I think if the email is invalid, then we should return `false` as "unsafe"
 in this case is whether or not it matches a banned list when a valid
 domain is provided.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39915#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list