summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-08 10:19:24 +0200
committerVincent Petry <pvince81@owncloud.com>2016-06-08 10:19:24 +0200
commit8d0948977e2c943c468b6365b5c0104c398a32bf (patch)
tree2f24be08e668094be4b314a32fd6adb0c8a98bef /lib/private/Files/Cache
parented92f4c4272a1681e32e2b1c33997e9c0281cca4 (diff)
parentf119769c2683ae55aee440e6188933c7b59998cd (diff)
downloadnextcloud-server-8d0948977e2c943c468b6365b5c0104c398a32bf.tar.gz
nextcloud-server-8d0948977e2c943c468b6365b5c0104c398a32bf.zip
Merge pull request #24899 from owncloud/local-storage-symlinks
dissalow symlinks in local storages that point outside the datadir
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/Scanner.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index e6bd118d5a5..c17f9bfd51b 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -38,6 +38,7 @@ use OC\Files\Filesystem;
use OC\Hooks\BasicEmitter;
use OCP\Config;
use OCP\Files\Cache\IScanner;
+use OCP\Files\ForbiddenException;
use OCP\Files\Storage\ILockingStorage;
use OCP\Lock\ILockingProvider;
@@ -140,7 +141,11 @@ class Scanner extends BasicEmitter implements IScanner {
}
}
- $data = $this->getData($file);
+ try {
+ $data = $this->getData($file);
+ } catch (ForbiddenException $e) {
+ return null;
+ }
if ($data) {