Make WordPress Core

Ticket #43148: 43148.diff

File 43148.diff, 868 bytes (added by greatislander, 6 years ago)

Patch from https://github.com/WordPress/WordPress/pull/337

  • wp-includes/ms-functions.php

    diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php
    index c878739d6e8..da4b76d232f 100644
    a b function wpmu_validate_user_signup( $user_name, $user_email ) { 
    497497
    498498        $limited_email_domains = get_site_option( 'limited_email_domains' );
    499499        if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
    500                 $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
    501                 if ( ! in_array( $emaildomain, $limited_email_domains ) ) {
     500                $allowed_domains = array_map( 'strtolower', $limited_email_domains );
     501                $emaildomain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
     502                if ( ! in_array( $emaildomain, $allowed_domains ) ) {
    502503                        $errors->add( 'user_email', __( 'Sorry, that email address is not allowed!' ) );
    503504                }
    504505        }