From 436908ee3fa25ffa88f47317d532fcbf451cb56a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Apr 2020 16:43:10 +0200 Subject: [PATCH 1/2] filter out blacklisted files in getDirectoryContent Signed-off-by: Robin Appelman --- lib/private/Files/Storage/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 86252f5c3dd6e..93e13937f5cab 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -874,7 +874,7 @@ public function getDirectoryContent($directory): \Traversable { if (is_resource($dh)) { $basePath = rtrim($directory, '/'); while (($file = readdir($dh)) !== false) { - if (!Filesystem::isIgnoredDir($file)) { + if (!Filesystem::isIgnoredDir($file) && !Filesystem::isFileBlacklisted($file)) { $childPath = $basePath . '/' . trim($file, '/'); yield $this->getMetaData($childPath); } From 7a4ea4a6b60c73af8f14da21bb227b02cf2b7b90 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Apr 2020 13:35:30 +0200 Subject: [PATCH 2/2] make php-cs happy Signed-off-by: Robin Appelman --- apps/files_sharing/lib/Controller/ShareesAPIController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index bc63bfc5351f4..c74b626b27929 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -48,7 +48,6 @@ use OCP\IRequest; use OCP\IURLGenerator; use OCP\Share\IShare; -use OCP\Share; use OCP\Share\IManager; use function usort;