diff options
author | Robin Appelman <robin@icewind.nl> | 2020-04-23 14:08:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 14:08:47 +0000 |
commit | 7c6e77a7fac364a1686805526e698e123c9a19a8 (patch) | |
tree | abf94d66cc595c28f46787b2b5b612d0016ca6f1 | |
parent | 3c2dd082640d2429c81639156291cb5978f60eec (diff) | |
parent | 7a4ea4a6b60c73af8f14da21bb227b02cf2b7b90 (diff) | |
download | nextcloud-server-7c6e77a7fac364a1686805526e698e123c9a19a8.tar.gz nextcloud-server-7c6e77a7fac364a1686805526e698e123c9a19a8.zip |
Merge pull request #20599 from nextcloud/getDirectoryContent-filter-blacklisted
filter out blacklisted files in getDirectoryContent
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 1 | ||||
-rw-r--r-- | lib/private/Files/Storage/Common.php | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index bc63bfc5351..c74b626b279 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -48,7 +48,6 @@ use OCP\IConfig; use OCP\IRequest; use OCP\IURLGenerator; use OCP\Share\IShare; -use OCP\Share; use OCP\Share\IManager; use function usort; diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 86252f5c3dd..93e13937f5c 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -874,7 +874,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { 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); } |