diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-02-09 23:45:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-02-09 23:45:32 +0100 |
commit | 068f6107c63e67554d65c089861838eaf73c668d (patch) | |
tree | 7b6342842b3335f3a877daf5321bd9360a0cc82a /lib | |
parent | 297b52fa4c1a6dd17b106dafcc20594d87fbb65f (diff) | |
parent | 86935fab17a823071c4593f1b27aeb2d4df4e99c (diff) | |
download | nextcloud-server-068f6107c63e67554d65c089861838eaf73c668d.tar.gz nextcloud-server-068f6107c63e67554d65c089861838eaf73c668d.zip |
Merge pull request #13842 from owncloud/is_file_2_is_readable
check if cache files are readable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/cache/file.php | 2 | ||||
-rw-r--r-- | lib/private/cache/fileglobal.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index 4e7c065678e..3b500c4e45b 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -83,7 +83,7 @@ class File { public function hasKey($key) { $storage = $this->getStorage(); - if ($storage && $storage->is_file($key)) { + if ($storage && $storage->is_file($key) && $storage->isReadable($key)) { return true; } return false; diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php index d9e0fd46d37..8406adabd75 100644 --- a/lib/private/cache/fileglobal.php +++ b/lib/private/cache/fileglobal.php @@ -52,7 +52,7 @@ class FileGlobal { public function hasKey($key) { $key = $this->fixKey($key); $cache_dir = self::getCacheDir(); - if ($cache_dir && is_file($cache_dir.$key)) { + if ($cache_dir && is_file($cache_dir.$key) && is_readable($cache_dir.$key)) { $mtime = filemtime($cache_dir.$key); if ($mtime < time()) { unlink($cache_dir.$key); |