1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-25 20:45:16 +02:00

[ticket/12099] Fix clean_path() ".." stripping when previous directory was "."

PHPBB3-12099
This commit is contained in:
Joas Schilling
2014-05-13 20:04:53 +02:00
parent 41e52d9c9d
commit 638d43d6fe

View File

@ -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);
}