[wp-trac] [WordPress Trac] #52976: user emails comparison should be case insensitive

WordPress Trac noreply at wordpress.org
Sat Apr 10 15:24:18 UTC 2021


#52976: user emails comparison should be case insensitive
----------------------------------------+------------------------------
 Reporter:  asaifm                      |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Users                       |     Version:  4.3
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by paaggeli):

 Hi, I found some other locations that use !== and === for emails
 comparisons.

 {{{
 wp-admin\includes\class-wp-automatic-updater.php:
 if ( $notified && get_site_option( 'admin_email' ) === $notified['email']
 && $notified['version'] == $item->current ) {

 wp-admin\includes\class-wp-automatic-updater.php:
 if ( $n && 'fail' === $n['type'] && get_site_option( 'admin_email' ) ===
 $n['email'] && $n['version'] == $core_update->current ) {

 wp-admin\includes\misc.php:
 if ( get_option( 'admin_email' ) === $value || ! is_email( $value ) ) {

 wp-admin\network\settings.php:
 if ( $new_admin_email && get_site_option( 'admin_email' ) !==
 $new_admin_email ) :

 wp-includes\ms-functions.php:
 if ( get_site_option( 'admin_email' ) === $value || ! is_email( $value ) )
 {
 }}}

 Because I'm new to contributing to WordPress, should I create a patch that
 uses strcasecmp()  for email comparisons, or should I wait until it's
 clear that we need case insensitive email comparison?

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


More information about the wp-trac mailing list