diff options
author | Olivier Paroz <github@oparoz.com> | 2015-04-18 12:33:43 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-04-18 12:33:43 +0200 |
commit | fcc1b9b3cc314e4b9032fbebfbce0333eae44998 (patch) | |
tree | b4cab78fedb9153746612928acbf3b4beaa694c6 | |
parent | 8cb0d97b1099561d7f9a059f3ba8105a2c719aab (diff) | |
download | nextcloud-server-fcc1b9b3cc314e4b9032fbebfbce0333eae44998.tar.gz nextcloud-server-fcc1b9b3cc314e4b9032fbebfbce0333eae44998.zip |
Thou shalt not corrupt the answer of a cache request
-rw-r--r-- | apps/files_sharing/lib/readonlycache.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/readonlycache.php b/apps/files_sharing/lib/readonlycache.php index ebef1634757..c7640f896f4 100644 --- a/apps/files_sharing/lib/readonlycache.php +++ b/apps/files_sharing/lib/readonlycache.php @@ -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; } |