[wp-trac] [WordPress Trac] #17433: localhost is not accepted as email domain

WordPress Trac noreply at wordpress.org
Fri Feb 6 20:20:17 UTC 2015


#17433: localhost is not accepted as email domain
----------------------------------------+-----------------------------
 Reporter:  sanvila                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Formatting                  |     Version:  3.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by salcode):

 I think we can remove the following check from {{{sanitize_email()}}}
 {{{
         // Assume the domain will have at least two subs, whitelist
 localhost
         if ( 2 > count( $subs ) && 'localhost' !== strtolower( $domain ) )
 {
                 /** This filter is documented in wp-
 includes/formatting.php */
                 return apply_filters( 'sanitize_email', '', $email,
 'domain_no_periods' );
         }
 }}}
 because it is redundant with this check later in the function
 {{{
         // If there aren't 2 or more valid subs, whitelist localhost
         if ( 2 > count( $new_subs ) && 'localhost' !== strtolower( $domain
 ) ) {
                 /** This filter is documented in wp-
 includes/formatting.php */
                 return apply_filters( 'sanitize_email', '', $email,
 'domain_no_valid_subs' );
         }
 }}}

 I've updated this patch with 17433-4.diff

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


More information about the wp-trac mailing list