[wp-trac] [WordPress Trac] #40372: oEmbing http://remote.site?p=1234 try to embed post id 1234 from local site
WordPress Trac
noreply at wordpress.org
Wed Apr 5 15:25:49 UTC 2017
#40372: oEmbing http://remote.site?p=1234 try to embed post id 1234 from local site
--------------------------+-----------------------------
Reporter: f.staude | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 4.7.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When I try to embed a url like http://webcompetent.org/?p=6343, Wordpress
tries to embed the page with the id 6343 from my own site.
This is because the function url_to_postid is called via the filter
wp_filter_pre_oembed_result. There is not checked as first whether it is
the url of the own side. Therefore supplies
{{{#!php
// First, check to see if there is a 'p=N' or 'page_id=N' to match
against
if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url,
$values) ) {
$id = absint($values[2]);
if ( $id )
return $id;
}
}}}
the ID of the remote page as a local ID.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40372>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list