Make WordPress Core

Ticket #43856: 43856.4.diff

File 43856.4.diff, 2.1 KB (added by garrett-eclipse, 15 months ago)

Refresh patch to us $_SERVER['REMOTE_ADDR']

  • src/wp-login.php

     
    432432        $message .= sprintf( __( 'Site Name: %s' ), $site_name ) . "\r\n\r\n";
    433433        /* translators: %s: User login. */
    434434        $message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
    435         $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.' ) . "\r\n\r\n";
     435        $message .= __( 'If this was a mistake ignore this email and nothing will happen.' ) . "\r\n\r\n";
    436436        $message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
    437         $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . "\r\n";
     437        $message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . "\r\n\r\n";
    438438
     439        $requestor_ip = $_SERVER['REMOTE_ADDR'];
     440        if ( $requestor_ip ) {
     441                $message .= sprintf(
     442                        /* translators: %s: IP address of password reset requestor. */
     443                        __( 'This password reset request originated from the IP address %s.' ),
     444                        $requestor_ip
     445                ) . "\r\n";
     446        }
     447
    439448        /* translators: Password reset notification email subject. %s: Site title. */
    440449        $title = sprintf( __( '[%s] Password Reset' ), $site_name );
    441450
  • src/wp-admin/includes/class-wp-privacy-policy-content.php

     
    584584                        $strings[] = '<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not share any personal data with anyone.' ) . '</p>';
    585585                }
    586586
     587                /* translators: Default privacy policy text. */
     588                $strings[] = '<p>' . $suggested_text . __( 'If you request a password reset, your IP address will be included in the reset email.' ) . '</p>';
     589
    587590                /* translators: Default privacy policy heading. */
    588591                $strings[] = '<h2>' . __( 'How long we retain your data' ) . '</h2>';
    589592