mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
commit
e80253209f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue