WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#10417 closed enhancement (duplicate)

Provide redirection follow capabilities in HTTP API when safe_mode or open_basedir are set

Reported by: sivel Owned by: dd32
Milestone: Priority: normal
Severity: normal Version: 2.8.1
Component: HTTP API Keywords:
Focuses: Cc:

Description

When safe_mode or open_basedir are set it seems that the only transport that can "follow" the redirects is fsockopen. All others stop after the initial request.

Simplepie seems to have a method of "manually" following by checking to see if the last response was a 30x and checks the number of redirects. If the last response was a 30x and the redirects that happened were less than configured it does a "manual" follow by requesting, grabbing the 'Location' header and then requesting again until it either hits the redirect limit or a non 30x response code.

Change History (5)

comment:1 sivel5 years ago

Just to cross reference 2 other tickets:
#10416
#10418

comment:2 dd325 years ago

I believe one of the transports includes a check to see if its running under safemode, and not to use it in that scenario.

Just need some extra constraints added to the ::test(); methods IMO

comment:3 sivel5 years ago

Basically in the end if we add the checks to see if running in safe mode it will limit us to fsockopen. That is fine with me, if everyone else is ok with it.

comment:4 ryan4 years ago

  • Milestone changed from 2.9 to Future Release

comment:5 dd324 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See: #11305 WP_Http won't follow redirects if open_basedir is in effect

Note: See TracTickets for help on using tickets.