mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[ticket/11362] Correctly sanitise the directory path
We need to correctly remove ../ form the path if possible by removing the previous folder aswell. Otherwise the finder is unable to locate /adm/style directories in extensions as he is looking for /adm/../adm/style instead. PHPBB3-11362
This commit is contained in:
parent
d6930df7a2
commit
567eefb2bd
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ class phpbb_extension_finder
|
|||
*/
|
||||
protected function sanitise_directory($directory)
|
||||
{
|
||||
$directory = preg_replace('#(?:^|/)\./#', '/', $directory);
|
||||
$directory = phpbb_clean_path($directory);
|
||||
$dir_len = strlen($directory);
|
||||
|
||||
if ($dir_len > 1 && $directory[$dir_len - 1] === '/')
|
||||
|
|
Loading…
Add table
Reference in a new issue