Make WordPress Core


Ignore:
Timestamp:
05/17/2025 01:29:20 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Check that $_POST value is a string in retrieve_password().

This prevents a fatal error from trim() if an array is passed instead.

Follow-up to [6643], [19056], [41782], [50129], [50140], [59595].

Props leedxw, dilipbheda, mukesh27, SergeyBiryukov.
Fixes #63433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r60178 r60240  
    31733173
    31743174    // Use the passed $user_login if available, otherwise use $_POST['user_login'].
    3175     if ( ! $user_login && ! empty( $_POST['user_login'] ) ) {
     3175    if ( ! $user_login && ! empty( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
    31763176        $user_login = $_POST['user_login'];
    31773177    }
Note: See TracChangeset for help on using the changeset viewer.