From 638d43d6fea5b5c3c1690b23d7cbe7b9bcef48c9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 13 May 2014 20:04:53 +0200 Subject: [ticket/12099] Fix clean_path() ".." stripping when previous directory was "." PHPBB3-12099 --- phpBB/phpbb/filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/filesystem.php') diff --git a/phpBB/phpbb/filesystem.php b/phpBB/phpbb/filesystem.php index 683a12ab76..77517082e5 100644 --- a/phpBB/phpbb/filesystem.php +++ b/phpBB/phpbb/filesystem.php @@ -35,7 +35,7 @@ class filesystem continue; } - if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..') + if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '.' && $filtered[sizeof($filtered) - 1] !== '..') { array_pop($filtered); } -- cgit v1.2.1