Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40372 closed defect (bug) (duplicate)

oEmbing try to embed post id 1234 from local site

Reported by: fstaude's profile f.staude Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.3
Component: Embeds Keywords:
Focuses: Cc:


When I try to embed a url like, 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

        // 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.

Change History (1)

#1 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Same as #40368 and #39373. Guess we need to adjust the priority of that bug.

Note: See TracTickets for help on using tickets.