mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
Merge branch 'ticket/nickvergessen/9930' into develop-olympus
* ticket/nickvergessen/9930: [ticket/9930] Redirect failes with open_basedir enabled.
This commit is contained in:
@@ -2353,12 +2353,12 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
|||||||
// Relative uri
|
// Relative uri
|
||||||
$pathinfo = pathinfo($url);
|
$pathinfo = pathinfo($url);
|
||||||
|
|
||||||
if (!$disable_cd_check && !file_exists($pathinfo['dirname']))
|
if (!$disable_cd_check && !file_exists($pathinfo['dirname'] . '/'))
|
||||||
{
|
{
|
||||||
$url = str_replace('../', '', $url);
|
$url = str_replace('../', '', $url);
|
||||||
$pathinfo = pathinfo($url);
|
$pathinfo = pathinfo($url);
|
||||||
|
|
||||||
if (!file_exists($pathinfo['dirname']))
|
if (!file_exists($pathinfo['dirname'] . '/'))
|
||||||
{
|
{
|
||||||
// fallback to "last known user page"
|
// fallback to "last known user page"
|
||||||
// at least this way we know the user does not leave the phpBB root
|
// at least this way we know the user does not leave the phpBB root
|
||||||
|
Reference in New Issue
Block a user