WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#25071 closed defect (bug) (wontfix)

fetch_feed() returns WP_Error with "A valid URL was not provided"

Reported by: jaychris Owned by:
Milestone: Priority: normal
Severity: major Version: 3.6
Component: Feeds Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

This seems to be the same bug as #24646, but is not resolved in 3.6.

I just upgraded to 3.6, but get this error when trying to fetch a feed from a URL that resolves to an internal address:

object(WP_Error)#657 (2) { ["errors"]=> array(1) { ["simplepie-error"]=> array(1) { [0]=> string(44) "WP HTTP Error: A valid URL was not provided." } } ["error_data"]=> array(0) { } }

I can fetch the url successfully using any number of local utilities, so it's able to respond correctly when called.

Both sites (client site and feed provider) reside on the same host (but NOT multi-site) and are behind a firewall, it's not possible to fetch via the external IP resolver.

Change History (4)

comment:1 SergeyBiryukov8 months ago

  • Description modified (diff)

comment:2 SergeyBiryukov8 months ago

  • Milestone changed from Awaiting Review to 3.7

Moving for investigation.

comment:3 in reply to: ↑ description nacin8 months ago

Replying to jaychris:

Both sites (client site and feed provider) reside on the same host (but NOT multi-site) and are behind a firewall, it's not possible to fetch via the external IP resolver.

This isn't something we can solve for in WordPress core without opening up a potential security hole.

You'll need to whitelist the target hosts using the http_request_host_is_external filter.

comment:4 nacin8 months ago

  • Milestone 3.7 deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.