From b9fd40a8cbd93a6d1fbb84084fae79984e722465 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Jan 2016 07:29:27 +0000 Subject: [PATCH] Users: Decode special characters in password and email change notification emails. Fixes #35283. Built from https://develop.svn.wordpress.org/trunk@36306 git-svn-id: http://core.svn.wordpress.org/trunk@36273 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 195f72cc8d..3cf37bdf05 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1689,7 +1689,7 @@ function wp_update_user($userdata) { if ( ! is_wp_error( $user_id ) ) { - $blog_name = wp_specialchars_decode( get_option( 'blogname' ) ); + $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); if ( ! empty( $send_password_change_email ) ) { @@ -1741,7 +1741,7 @@ All at ###SITENAME### $pass_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $pass_change_email['message'] ); - $pass_change_email['message'] = str_replace( '###SITENAME###', get_option( 'blogname' ), $pass_change_email['message'] ); + $pass_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $pass_change_email['message'] ); $pass_change_email['message'] = str_replace( '###SITEURL###', home_url(), $pass_change_email['message'] ); wp_mail( $pass_change_email['to'], sprintf( $pass_change_email['subject'], $blog_name ), $pass_change_email['message'], $pass_change_email['headers'] ); @@ -1795,7 +1795,7 @@ All at ###SITENAME### $email_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $email_change_email['message'] ); - $email_change_email['message'] = str_replace( '###SITENAME###', get_option( 'blogname' ), $email_change_email['message'] ); + $email_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###SITEURL###', home_url(), $email_change_email['message'] ); wp_mail( $email_change_email['to'], sprintf( $email_change_email['subject'], $blog_name ), $email_change_email['message'], $email_change_email['headers'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5822664725..e14a44d2b8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36305'; +$wp_version = '4.5-alpha-36306'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.