Make WordPress Core


Ignore:
Timestamp:
10/12/2023 03:05:46 PM (3 years ago)
Author:
davidbaumwald
Message:

Grouped backports to the 5.3 branch.

  • Comments: Prevent users who can not see a post from seeing comments on it.
  • Shortcodes: Restrict media shortcode ajax to certain type.
  • REST API: Ensure no-cache headers are sent when methods are overridden.
  • REST API: Limit search_columns for users without list_users.
  • Prevent unintended behavior when certain objects are unserialized.

Merges [56833], [56834], [56835], [56836], and [56838] to the 5.3 branch.
Props xknown, jorbin, joehoyle, timothyblynjacobs, peterwilsoncc, ehtis, tykoted, antpb, rmccue.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r46070 r56877  
    284284
    285285                if ( ! empty( $prepared_args['search'] ) ) {
     286                        if ( ! current_user_can( 'list_users' ) ) {
     287                                $prepared_args['search_columns'] = array( 'ID', 'user_login', 'user_nicename', 'display_name' );
     288                        }
    286289                        $prepared_args['search'] = '*' . $prepared_args['search'] . '*';
    287290                }
Note: See TracChangeset for help on using the changeset viewer.