[wp-trac] [WordPress Trac] #42693: WordPress 4.9 sends an "admin email address was changed" message to you at example.com on new install

WordPress Trac noreply at wordpress.org
Sun Nov 26 18:16:35 UTC 2017


#42693: WordPress 4.9 sends an "admin email address was changed" message to
you at example.com on new install
--------------------------------------------------+--------------------
 Reporter:  tigertech                             |       Owner:
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  4.9.2
Component:  Upgrade/Install                       |     Version:  4.9
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:
--------------------------------------------------+--------------------

Comment (by tigertech):

 Replying to [comment:8 MattyRob]:

 > One other thought I'd had was improving the core is_email() function and
 only sending the email if that validates however it seems DNS checks were
 moved from that filter previously and PHP filter_var() is not enabled on
 all installs.

 Yeah -- DNS checks for working email are tricky and prone to transient
 false indications of failure. I think the second patch (changing the
 default TLD to ".invalid" and then avoiding sending to "invalid"
 addresses) is sufficient and wise.

 My only pedantic comment is that the check should probably be
 {{{
         if ( '.invalid' === substr( $old_email, -8 ) {
 }}}
 ... rather than:
 {{{
         if ( 'invalid' === substr( $old_email, -7 ) {
 }}}
 ... on the basis that the RFC doesn't technically prohibit things like
 ".xinvalid" as a valid TLD. It also makes it a little clearer what the
 code is doing.

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


More information about the wp-trac mailing list