Make WordPress Core

Ticket #42957: 42957-password-reset-username-ending-in-period.diff

File 42957-password-reset-username-ending-in-period.diff, 870 bytes (added by paulcline, 7 years ago)
  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index 6415b1544a..cb7e845149 100644
    a b function retrieve_password() { 
    376376        $message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
    377377        $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.' ) . "\r\n\r\n";
    378378        $message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
    379         $message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">\r\n";
     379        $message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . str_replace( ".", "%2E", rawurlencode( $user_login ) ), 'login' ) . ">\r\n";
    380380
    381381        /* translators: Password reset email subject. %s: Site name */
    382382        $title = sprintf( __( '[%s] Password Reset' ), $site_name );