aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-10-17 15:03:06 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-10-17 15:08:09 -0400
commitc630480ca1a426cb0897be35626baac2694fccf5 (patch)
tree4c10e50d452bbaeacb2fd057b3986edad112872a /phpBB/common.php
parentf0544c884f6862e41bf35e6bd89db5849aa74e9f (diff)
downloadforums-c630480ca1a426cb0897be35626baac2694fccf5.tar
forums-c630480ca1a426cb0897be35626baac2694fccf5.tar.gz
forums-c630480ca1a426cb0897be35626baac2694fccf5.tar.bz2
forums-c630480ca1a426cb0897be35626baac2694fccf5.tar.xz
forums-c630480ca1a426cb0897be35626baac2694fccf5.zip
[ticket/10848] Redirect from adm to installer correctly.
PHPBB3-10848
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 491addc5e0..bdb33707cc 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -38,10 +38,14 @@ if (!defined('PHPBB_INSTALLED'))
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
+ // $phpbb_root_path accounts for redirects from e.g. /adm
+ $script_path = trim(dirname($script_name)) . '/' . $phpbb_root_path . 'install/index.' . $phpEx;
// Replace any number of consecutive backslashes and/or slashes with a single slash
// (could happen on some proxy setups and/or Windows servers)
- $script_path = trim(dirname($script_name)) . '/install/index.' . $phpEx;
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
+ // Eliminate . and .. from the path
+ require($phpbb_root_path . 'includes/functions.' . $phpEx);
+ $script_path = clean_path($script_path);
$url = (($secure) ? 'https://' : 'http://') . $server_name;