Make WordPress Core


Ignore:
Timestamp:
04/29/2020 04:04:20 PM (5 years ago)
Author:
whyisjake
Message:

Customize: Add additional filters to Customizer to prevent JSON corruption.
User: Invalidate user_activation_key on password update.
Query: Ensure that only a single post can be returned on date/time based queries.
Block Editor: Coding standards, properly escape class names.
Cache API: Ensure proper escaping around the stats method in the cache API.
Formatting: Expand sanitize_file_name to have better support for utf8 characters.

Brings the changes in [47633], [47634], [47635], [47636], [47637], and [47638] to the 5.4 branch.

Props: aduth, batmoo, ehti, ellatrix, jorgefilipecosta, nickdaugherty, noisysocks, pento, peterwilsoncc, sergeybiryukov, sstoqnov, talldanwp, westi, westonruter, whyisjake, whyisjake, xknown.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-includes/post.php

    r46977 r47644  
    35553555    global $wpdb;
    35563556
     3557    // Capture original pre-sanitized array for passing into filters.
     3558    $unsanitized_postarr = $postarr;
     3559
    35573560    $user_id = get_current_user_id();
    35583561
     
    38663869         *
    38673870         * @since 3.9.0
     3871         * @since 5.4.1 `$unsanitized_postarr` argument added.
    38683872         *
    3869          * @param array $data    An array of sanitized attachment post data.
    3870          * @param array $postarr An array of unsanitized attachment post data.
     3873         * @param array $data                An array of slashed, sanitized, and processed attachment post data.
     3874         * @param array $postarr             An array of slashed and sanitized attachment post data, but not processed.
     3875         * @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
     3876         *                                   as originally passed to wp_insert_post().
    38713877         */
    3872         $data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
     3878        $data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr );
    38733879    } else {
    38743880        /**
     
    38763882         *
    38773883         * @since 2.7.0
     3884         * @since 5.4.1 `$unsanitized_postarr` argument added.
    38783885         *
    3879          * @param array $data    An array of slashed post data.
    3880          * @param array $postarr An array of sanitized, but otherwise unmodified post data.
     3886         * @param array $data                An array of slashed, sanitized, and processed post data.
     3887         * @param array $postarr             An array of sanitized (and slashed) but otherwise unmodified post data.
     3888         * @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as
     3889         *                                   originally passed to wp_insert_post().
    38813890         */
    3882         $data = apply_filters( 'wp_insert_post_data', $data, $postarr );
     3891        $data = apply_filters( 'wp_insert_post_data', $data, $postarr, $unsanitized_postarr );
    38833892    }
    38843893    $data  = wp_unslash( $data );
Note: See TracChangeset for help on using the changeset viewer.