Skip to content

Commit

Permalink
#4844: File Inspector: Do not traverse above the base directory
Browse files Browse the repository at this point in the history
Fixes: #4844
  • Loading branch information
Deltik committed Aug 8, 2022
1 parent fd45424 commit 015598f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e107_admin/fileinspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,11 @@ private function inspect_existing($baseDir)
$absoluteBase = realpath($baseDir);
if (!is_dir($absoluteBase)) return;

$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($baseDir));
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
$baseDir, FilesystemIterator::SKIP_DOTS
)
);
foreach ($iterator as $file)
{
$this->sendProgress(1);
Expand Down

0 comments on commit 015598f

Please sign in to comment.