mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Merge pull request #4845 from Deltik/fix/4844
Fixes #4844: File Inspector: Do not traverse above the base directory
This commit is contained in:
commit
29331ea635
@ -601,7 +601,11 @@ class file_inspector {
|
|||||||
$absoluteBase = realpath($baseDir);
|
$absoluteBase = realpath($baseDir);
|
||||||
if (!is_dir($absoluteBase)) return;
|
if (!is_dir($absoluteBase)) return;
|
||||||
|
|
||||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($baseDir));
|
$iterator = new RecursiveIteratorIterator(
|
||||||
|
new RecursiveDirectoryIterator(
|
||||||
|
$baseDir, FilesystemIterator::SKIP_DOTS
|
||||||
|
)
|
||||||
|
);
|
||||||
foreach ($iterator as $file)
|
foreach ($iterator as $file)
|
||||||
{
|
{
|
||||||
$this->sendProgress(1);
|
$this->sendProgress(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user