diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-11-25 23:29:12 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2010-11-25 23:29:12 +0100 |
commit | 5ec1c887959be5629c8a4c712b152d58058929a8 (patch) | |
tree | 36ce103308fdf50b789a8e819e50ad398f1f8ec8 /phpBB/includes | |
parent | f204ce682565c87b041abafa69db76d698b60dfc (diff) | |
download | forums-5ec1c887959be5629c8a4c712b152d58058929a8.tar forums-5ec1c887959be5629c8a4c712b152d58058929a8.tar.gz forums-5ec1c887959be5629c8a4c712b152d58058929a8.tar.bz2 forums-5ec1c887959be5629c8a4c712b152d58058929a8.tar.xz forums-5ec1c887959be5629c8a4c712b152d58058929a8.zip |
[ticket/9930] Redirect failes with open_basedir enabled.
Open_basedir does not allow file_exists() for "." and directories without a
trayling-slash. Therefor we must append it on the check.
PHPBB3-9930
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 561a9906c4..c7f19b709d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2353,12 +2353,12 @@ function redirect($url, $return = false, $disable_cd_check = false) // Relative uri $pathinfo = pathinfo($url); - if (!$disable_cd_check && !file_exists($pathinfo['dirname'])) + if (!$disable_cd_check && !file_exists($pathinfo['dirname'] . '/')) { $url = str_replace('../', '', $url); $pathinfo = pathinfo($url); - if (!file_exists($pathinfo['dirname'])) + if (!file_exists($pathinfo['dirname'] . '/')) { // fallback to "last known user page" // at least this way we know the user does not leave the phpBB root |