diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-05-30 15:44:19 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-06-07 14:01:53 +0200 |
commit | 7b1b723e5b04173409117aca1f7e76bed5762d9f (patch) | |
tree | 22e09226a7f4853c3a7d936a33a29d8115af8bcf /lib/private/legacy/helper.php | |
parent | 46fe2ddf2e7a4413586095143521684a0377daad (diff) | |
download | nextcloud-server-7b1b723e5b04173409117aca1f7e76bed5762d9f.tar.gz nextcloud-server-7b1b723e5b04173409117aca1f7e76bed5762d9f.zip |
dissalow symlinks in local storages that point outside the datadir
Diffstat (limited to 'lib/private/legacy/helper.php')
-rw-r--r-- | lib/private/legacy/helper.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index f107d47faf7..21fb3cbc5ab 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -206,7 +206,9 @@ class OC_Helper { foreach ($files as $fileInfo) { /** @var SplFileInfo $fileInfo */ - if ($fileInfo->isDir()) { + if ($fileInfo->isLink()) { + unlink($fileInfo->getPathname()); + } else if ($fileInfo->isDir()) { rmdir($fileInfo->getRealPath()); } else { unlink($fileInfo->getRealPath()); |