#11305 closed defect (bug) (fixed)
WP_Http won't follow redirects if open_basedir is in effect
Reported by: | calin | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.0 | Priority: | low |
Severity: | minor | Version: | 2.8.5 |
Component: | HTTP API | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
None of the existing transport methods (tested with all methods) follow the location header if PHP setting open_basedir is in effect. This further affects the SimplePie RSS, triggering errors for redirected feeds with the error: A feed could not be found at http://thebl.og/feed/ in /wp-includes/class-simplepie.php on line 1680.
Attachments (2)
Change History (18)
#2
@
15 years ago
- Milestone changed from Unassigned to Future Release
- Priority changed from normal to low
- Severity changed from normal to minor
- Version set to 2.8.5
#4
@
15 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Future Release to 3.0
#5
@
15 years ago
This doesnt affect all transports.
Specifically, This affects Curl only, When Running under safe mode, or when open_basedir is set - http://core.trac.wordpress.org/browser/trunk/wp-includes/http.php#L1329 redirection is specifically disabled in the event of either.
I dont think the proposed location in the patch is the best place for it. Patch forthcoming which moves this check into the Curl handler and only activates if Follow location was disabled.
#6
@
15 years ago
This doesnt affect all transports.
Although i've said that, I realise that the OP has stated that it does..
I've tested all the transports aside from the PHP HTTP Extension, and they all seem to play ball with the attached patch.. Taking into account #11557 & the fact that the Fsockopen transport also manually follows redirects.. The original statement didnt seem correct to me.
@
15 years ago
Updated patch based on Fsockopen's syntax, to keep the logic constant throughout the file.
#7
@
15 years ago
Closed #10417 as Duplicate of this.
According to Sivel on that ticket:
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.
So it could potentially just be my system that Streams and Fopen are following the redirects.. Can someone else confirm that?
#11
@
15 years ago
- Keywords reporter-feedback added; has-patch needs-testing removed
I commited the changes that affect curl.
Could someone please report under what specific conditions streams/fopen are affected?
PHP Version, and possibly a print of phpinfo() could be very useful.
Isn't open_basedir supposed to go away with php6?