aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-09-10 16:19:39 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-09-10 16:19:39 -0400
commit18f6a161017f5350d9487181f4b4ed66a53a0284 (patch)
tree5d43d1847832169510c55c3358c42ccd095b2128 /phpBB/includes/functions.php
parent3f81057f96ae87d2a881f5c71be1816c703cb1fd (diff)
parent71aeec40f6c4c5e6a69699486b618c2ba67dff2d (diff)
downloadforums-18f6a161017f5350d9487181f4b4ed66a53a0284.tar
forums-18f6a161017f5350d9487181f4b4ed66a53a0284.tar.gz
forums-18f6a161017f5350d9487181f4b4ed66a53a0284.tar.bz2
forums-18f6a161017f5350d9487181f4b4ed66a53a0284.tar.xz
forums-18f6a161017f5350d9487181f4b4ed66a53a0284.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/oauth
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index f8af02bae8..bf973fe141 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5756,6 +5756,8 @@ function phpbb_create_symfony_request(phpbb_request $request)
*/
function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = '')
{
+ global $phpbb_container;
+
static $path;
if (null !== $path)
{
@@ -5769,7 +5771,11 @@ function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = ''
return $path;
}
- $corrections = substr_count($path_info, '/');
+ $filesystem = $phpbb_container->get('filesystem');
+ $path_info = $filesystem->clean_path($path_info);
+
+ // Do not count / at start of path
+ $corrections = substr_count(substr($path_info, 1), '/');
// When URL Rewriting is enabled, app.php is optional. We have to
// correct for it not being there