Thou shalt not corrupt the answer of a cache request

This commit is contained in:
Olivier Paroz 2015-04-18 12:33:43 +02:00
parent 8cb0d97b10
commit fcc1b9b3cc

View 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;
}