mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
fba290c061
Newer versions of libcurl prevent file:// location response headers by default, which means that the open_basedir check is unnecessary — the fact CURLOPT_REDIR_PROTOCOLS can't set CURLPROTO_FILE with open_basedir enabled means that there's no possibility of breaching the open_basedir restriction, and this allows HTTP redirects to be followed automatically. Implements FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode).
16 lines
397 B
PHP
16 lines
397 B
PHP
--TEST--
|
|
Bug #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode): open_basedir disabled
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
|
|
if (ini_get('open_basedir')) exit("skip open_basedir is set");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$ch = curl_init();
|
|
var_dump(curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true));
|
|
curl_close($ch);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|