Case sensitivity for is_email_address_unsafe().

Merges [25197] to the 3.6 branch.

props jkudish.
fixes #25046.

Built from https://develop.svn.wordpress.org/branches/3.6@25198


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-08-31 04:37:03 +00:00
parent 17068d7e86
commit a09b555bec
1 changed files with 5 additions and 2 deletions

View File

@ -378,7 +378,10 @@ function is_email_address_unsafe( $user_email ) {
$is_email_address_unsafe = false;
if ( $banned_names && is_array( $banned_names ) ) {
list( $email_local_part, $email_domain ) = explode( '@', $user_email );
$banned_names = array_map( 'strtolower', $banned_names );
$normalized_email = strtolower( $user_email );
list( $email_local_part, $email_domain ) = explode( '@', $normalized_email );
foreach ( $banned_names as $banned_domain ) {
if ( ! $banned_domain )
@ -390,7 +393,7 @@ function is_email_address_unsafe( $user_email ) {
}
$dotted_domain = ".$banned_domain";
if ( $dotted_domain === substr( $user_email, -strlen( $dotted_domain ) ) ) {
if ( $dotted_domain === substr( $normalized_email, -strlen( $dotted_domain ) ) ) {
$is_email_address_unsafe = true;
break;
}