REST API: Remove _wpnonce value from being used in hashed oEmbed proxy cache key.

Merges [41035] to 4.8 branch.
Amends [40628].
Props r-a-y, westonruter.
See #40450.
Fixes #41048 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41048


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-07-14 16:13:35 +00:00
parent 2d4418b905
commit 3a05029032

View File

@ -159,6 +159,7 @@ final class WP_oEmbed_Controller {
$args = $request->get_params();
// Serve oEmbed data from cache if set.
unset( $args['_wpnonce'] );
$cache_key = 'oembed_' . md5( serialize( $args ) );
$data = get_transient( $cache_key );
if ( ! empty( $data ) ) {