mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-24 20:17:58 +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;
|
||||
}
|
||||
|
||||
if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..')
|
||||
if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '.' && $filtered[sizeof($filtered) - 1] !== '..')
|
||||
{
|
||||
array_pop($filtered);
|
||||
}
|
||||
|
Reference in New Issue
Block a user