Customize: Prevent potential cache corruption when finding a secondary changeset post by UUID.

Props dlh.
Fixes #41738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2017-08-29 04:09:57 +00:00
parent a27cd850a2
commit 8e8969aa9c
2 changed files with 4 additions and 1 deletions

View File

@@ -816,7 +816,7 @@ final class WP_Customize_Manager {
if ( ! empty( $changeset_post_query->posts ) ) {
// Note: 'fields'=>'ids' is not being used in order to cache the post object as it will be needed.
$changeset_post_id = $changeset_post_query->posts[0]->ID;
wp_cache_set( $this->_changeset_uuid, $changeset_post_id, $cache_group );
wp_cache_set( $uuid, $changeset_post_id, $cache_group );
return $changeset_post_id;
}