Make WordPress Core


Ignore:
Timestamp:
08/06/2026 05:32:00 PM (7 weeks ago)
Author:
desrosj
Message:

Security: Backport the WordPress 7.0.3 security fixes to the 6.9 branch.

  • Users: Ensure a proper email address is used before sending email confirmations.
  • Formatting: Prevent stack overflow in safecss_filter_attr.
  • EmojI: Ensure that the emoji settings come from a script element.
  • Multisite: Enforce the active signup policy for existing users.
  • HTTP API: Improve compliance with IPv4 Special-Purpose Address Space.
  • Users: Prevent Usernames from mangling HTML
  • Comments: Exclude notes from comment feed queries.
  • Canonical: Only redirect for publicly viewable post types.
  • Administration: When wp_is_large_user_count(), ensure that the post author is always added to author dropdown.
  • Editor: Fix output of Post Date.
  • Editor: Ensure Content block tags always match available options.

Merges [63059],[63060],[63061],[63062],[63063],[63064],[63065],[63067],[62804] to the 6.9 branch.

Props xknown, westonruter, jeremyfelt, peterwilsoncc, paulkevan, lucasbustamante, jorbin, desrosj, vortfu, dmsnell, jonsurrell, davidbinda, johnbillion, ehtis, batmoo, lancewillett, wildworks, mukesh27, odkdn1, khokansardar, isabel_brison, bernhard-reiter, tyxla, aduth, talldanwp.

Location:
branches/6.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.9

  • branches/6.9/src/wp-includes/user.php

    r61137 r63077  
    187187                                /* translators: %s: User name. */
    188188                                __( '<strong>Error:</strong> The username <strong>%s</strong> is not registered on this site. If you are unsure of your username, try your email address instead.' ),
    189                                 $username
     189                                esc_html( $username )
    190190                        )
    191191                );
    … …  
    214214                                /* translators: %s: User name. */
    215215                                __( '<strong>Error:</strong> The password you entered for the username %s is incorrect.' ),
    216                                 '<strong>' . $username . '</strong>'
     216                                '<strong>' . esc_html( $username ) . '</strong>'
    217217                        ) .
    218218                        ' <a href="' . wp_lostpassword_url() . '">' .
    … …  
    297297                                /* translators: %s: Email address. */
    298298                                __( '<strong>Error:</strong> The password you entered for the email address %s is incorrect.' ),
    299                                 '<strong>' . $email . '</strong>'
     299                                '<strong>' . esc_html( $email ) . '</strong>'
    300300                        ) .
    301301                        ' <a href="' . wp_lostpassword_url() . '">' .
    … …  
    35293529                                /* translators: %s: Link to the login page. */
    35303530                                __( '<strong>Error:</strong> This email address is already registered. <a href="%s">Log in</a> with this address or choose another one.' ),
    3531                                 wp_login_url()
     3531                                esc_url( wp_login_url() )
    35323532                        )
    35333533                );
    … …  
    35773577                                /* translators: %s: Admin email address. */
    35783578                                __( '<strong>Error:</strong> Could not register you&hellip; please contact the <a href="mailto:%s">site admin</a>!' ),
    3579                                 get_option( 'admin_email' )
     3579                                esc_attr( get_option( 'admin_email' ) )
    35803580                        )
    35813581                );
    … …  
    38003800 * @since 3.0.0
    38013801 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
     3802 * @since 7.0.3 Added the `$user_id` parameter, which is sent with the `personal_options_update` action.
     3803 *
     3804 * @param int $user_id Optional. The ID of the user whose email is being changed. Defaults to `$_POST['user_id']` if set, otherwise 0.
    38023805 *
    38033806 * @global WP_Error $errors WP_Error object.
    38043807 */
    3805 function send_confirmation_on_profile_email() {
     3808function send_confirmation_on_profile_email( $user_id = 0 ) {
    38063809        global $errors;
     3810
     3811        // Maintain backward compatibility for those relying on a check based on $_POST['user_id'].
     3812        if ( ! $user_id && isset( $_POST['user_id'] ) ) {
     3813                $user_id = absint( $_POST['user_id'] );
     3814        }
    38073815
    38083816        $current_user = wp_get_current_user();
    … …  
    38113819        }
    38123820
    3813         if ( $current_user->ID !== (int) $_POST['user_id'] ) {
     3821        if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) {
    38143822                return false;
    38153823        }
    … …  
    38253833                        );
    38263834
     3835                        $_POST['email'] = addslashes( $current_user->user_email );
    38273836                        return;
    38283837                }
    … …  
    38383847                        delete_user_meta( $current_user->ID, '_new_email' );
    38393848
     3849                        $_POST['email'] = addslashes( $current_user->user_email );
    38403850                        return;
    38413851                }
Note: See TracChangeset for help on using the changeset viewer.