From 64f51bd3ddd362d25012edef9af692ddd1fd4fc7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 May 2014 15:35:54 +0200 Subject: [PATCH] [ticket/12099] Clean some paths before using them PHPBB3-12099 --- phpBB/phpbb/path_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index 0d83e7447e..eb2cbf7313 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -98,7 +98,7 @@ class path_helper { $path = substr($path, strlen($this->phpbb_root_path)); - return $this->get_web_root_path() . $path; + return $this->filesystem->clean_path($this->get_web_root_path() . $path); } return $path; @@ -158,7 +158,7 @@ class path_helper */ if ($path_info === '/' && preg_match('/app\.' . $this->php_ext . '\/$/', $request_uri)) { - return $this->web_root_path = $this->phpbb_root_path . '../'; + return $this->web_root_path = $this->filesystem->clean_path('../' . $this->phpbb_root_path); } /*