diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 56d5fd9f43..c4fa380fc0 100644
a
|
b
|
function wp_get_direct_php_update_url() { |
7559 | 7559 | return $direct_update_url; |
7560 | 7560 | } |
7561 | 7561 | |
| 7562 | |
| 7563 | |
| 7564 | |
| 7565 | |
| 7566 | |
| 7567 | |
| 7568 | |
| 7569 | |
| 7570 | |
| 7571 | |
| 7572 | |
| 7573 | |
7562 | 7574 | /** |
7563 | 7575 | * Display a button directly linking to a PHP update process. |
7564 | 7576 | * |
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index c53a723fc4..2a148d2d82 100644
a
|
b
|
if ( ! function_exists( 'wp_new_user_notification' ) ) : |
2082 | 2082 | /* translators: %s: User login. */ |
2083 | 2083 | $message = sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; |
2084 | 2084 | $message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n"; |
2085 | | $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . "\r\n\r\n"; |
| 2085 | $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . encode( $user->user_login ), 'login' ) . "\r\n\r\n"; |
2086 | 2086 | |
2087 | 2087 | $message .= wp_login_url() . "\r\n"; |
2088 | 2088 | |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index c4c44a0c69..3a9c04ca54 100644
a
|
b
|
function retrieve_password( $user_login = null ) { |
2771 | 2771 | $message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n"; |
2772 | 2772 | $message .= __( 'If this was a mistake, ignore this email and nothing will happen.' ) . "\r\n\r\n"; |
2773 | 2773 | $message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n"; |
2774 | | $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . "\r\n\r\n"; |
| 2774 | $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . encode( $user_login ), 'login' ) . "\r\n\r\n"; |
2775 | 2775 | |
2776 | 2776 | if ( ! is_user_logged_in() ) { |
2777 | 2777 | $requester_ip = $_SERVER['REMOTE_ADDR']; |
diff --git a/tests/phpunit/tests/functions/wpHalfBakedUrlEncode.php b/tests/phpunit/tests/functions/wpHalfBakedUrlEncode.php
new file mode 100644
index 0000000000..cb9880a0ef
-
|
+
|
|
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |