]> source.dussan.org Git - nextcloud-server.git/commitdiff
Thou shalt not corrupt the answer of a cache request
authorOlivier Paroz <github@oparoz.com>
Sat, 18 Apr 2015 10:33:43 +0000 (12:33 +0200)
committerOlivier Paroz <github@oparoz.com>
Sat, 18 Apr 2015 10:33:43 +0000 (12:33 +0200)
apps/files_sharing/lib/readonlycache.php

index ebef1634757ee6a00daecb63eab6ed43913f6968..c7640f896f467f4c175935e704da51c42baf1510 100644 (file)
@@ -28,7 +28,9 @@ use OC\Files\Cache\Cache;
 class ReadOnlyCache extends Cache {
        public function get($path) {
                $data = parent::get($path);
-               $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE);
+               if ($data !== false) {
+                       $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE);
+               }
                return $data;
        }