Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added is_dir lookup on $next - admin/controller/common/security.php file #11002

Merged
merged 1 commit into from Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions upload/admin/controller/common/security.php
Expand Up @@ -78,14 +78,16 @@ public function install(): void {
while (count($directory) != 0) {
$next = array_shift($directory);

foreach (glob(trim($next, '/') . '/{*,.[!.]*,..?*}', GLOB_BRACE) as $file) {
// If directory add to path array
if (is_dir($file)) {
$directory[] = $file;
if (is_dir($next)) {
foreach (glob(trim($next, '/') . '/{*,.[!.]*,..?*}', GLOB_BRACE) as $file) {
// If directory add to path array
if (is_dir($file)) {
$directory[] = $file;
}

// Add the file to the files to be deleted array
$files[] = $file;
}

// Add the file to the files to be deleted array
$files[] = $file;
}
}

Expand Down