Make WordPress Core

Ticket #42957: 42957.diff

File 42957.diff, 3.4 KB (added by daveagp, 3 years ago)

Diff generated from github pull request

  • src/wp-includes/functions.php

    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() { 
    75597559        return $direct_update_url;
    75607560}
    75617561
     7562
     7563
     7564
     7565
     7566
     7567
     7568
     7569
     7570
     7571
     7572
     7573
    75627574/**
    75637575 * Display a button directly linking to a PHP update process.
    75647576 *
  • src/wp-includes/pluggable.php

    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' ) ) : 
    20822082                /* translators: %s: User login. */
    20832083                $message  = sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
    20842084                $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";
    20862086
    20872087                $message .= wp_login_url() . "\r\n";
    20882088
  • src/wp-includes/user.php

    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 ) { 
    27712771        $message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
    27722772        $message .= __( 'If this was a mistake, ignore this email and nothing will happen.' ) . "\r\n\r\n";
    27732773        $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";
    27752775
    27762776        if ( ! is_user_logged_in() ) {
    27772777                $requester_ip = $_SERVER['REMOTE_ADDR'];
  • new file tests/phpunit/tests/functions/wpHalfBakedUrlEncode.php

    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