]> source.dussan.org Git - nextcloud-server.git/commitdiff
ignore forbidden files while scanning local storage 32027/head
authorRobin Appelman <robin@icewind.nl>
Wed, 20 Apr 2022 11:01:16 +0000 (13:01 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 20 Apr 2022 12:39:32 +0000 (12:39 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Storage/Local.php

index 34ab9a5fc9734d794adb34a90464439b7c495f07..d637b3d194f56a6998090bf0307ba745aea8e3b5 100644 (file)
@@ -173,7 +173,11 @@ class Local extends \OC\Files\Storage\Common {
         * @inheritdoc
         */
        public function getMetaData($path) {
-               $stat = $this->stat($path);
+               try {
+                       $stat = $this->stat($path);
+               } catch (ForbiddenException $e) {
+                       return null;
+               }
                if (!$stat) {
                        return null;
                }