Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40372 closed defect (bug) (duplicate)

oEmbing http://remote.site?p=1234 try to embed post id 1234 from local site

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

Description

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

        // 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
9 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

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

Note: See TracTickets for help on using tickets.