Make WordPress Core

Ticket #52529: 52529.patch

File 52529.patch, 912 bytes (added by emirpprime, 4 years ago)
  • src/wp-includes/user.php

    From 8ce92293a14e52361707b1edaa1ea789ba39c431 Mon Sep 17 00:00:00 2001
    From: Phil Banks <phl@bnks.xyz>
    Date: Mon, 15 Feb 2021 12:14:21 +0000
    Subject: [PATCH] wp_slash $old_user_data->user_email in wp_insert_user
    
    ---
     src/wp-includes/user.php | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 5c6db55afb..4496c7ec39 100644
    a b function wp_insert_user( $userdata ) { 
    17571757                        return new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) );
    17581758                }
    17591759
     1760                // Prevent failures in comparisons later.
     1761                $old_user_data->user_email = wp_slash( $old_user_data->user_email );
     1762
    17601763                // Hashed in wp_update_user(), plaintext if called directly.
    17611764                $user_pass = ! empty( $userdata['user_pass'] ) ? $userdata['user_pass'] : $old_user_data->user_pass;
    17621765        } else {