Opened 9 years ago
Closed 9 years ago
#41048 closed defect (bug) (fixed)
`WP_oEmbed_Controller::get_proxy_item()` should remove `_wpnonce` from cached `$args`
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.8.1 | Priority: | normal |
| Severity: | normal | Version: | 4.8 |
| Component: | Embeds | Keywords: | has-patch has-unit-tests commit fixed-major |
| Focuses: | rest-api | Cc: |
Description
When caching oEmbed proxy requests:
https://github.com/WordPress/WordPress/blob/4.8-branch/wp-includes/class-wp-oembed-controller.php#L159
The following arguments are used to generate the cache key:
Array
(
[format] => json
[maxwidth] => 600
[discover] =>
[url] => URL
[_wpnonce] => 94f457a20b
)
_wpnonce is added because of wp.media.view.settings.nonce.wpRestApi.
Since _wpnonce is variable, I think it would make sense to remove the _wpnonce key from the $args array so the cache is more likely to be hit.
It also makes it easier for plugins to reference the oEmbed transient when overriding wp_media_shortcode() for use with the Video Widget.
Attachments (1)
Change History (10)
Note: See
TracTickets for help on using
tickets.
Patched against 4.8 branch