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:
@ -35,7 +35,7 @@ class filesystem
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..')
|
if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '.' && $filtered[sizeof($filtered) - 1] !== '..')
|
||||||
{
|
{
|
||||||
array_pop($filtered);
|
array_pop($filtered);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user