Merge branch 'ticket/nickvergessen/9930' into develop-olympus

* ticket/nickvergessen/9930:
  [ticket/9930] Redirect failes with open_basedir enabled.
This commit is contained in:
Andreas Fischer 2010-12-03 01:41:43 +01:00
commit e80253209f

View file

@ -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