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: | r-a-y | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.8.1 |
| Component: | Embeds | Version: | 4.8 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit fixed-major |
| Cc: | Focuses: | rest-api |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patched against 4.8 branch