summaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-07-27 15:11:48 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2016-07-27 15:39:24 +0200
commit351cab6bce41b53f9efd4ba9aed4e7435f843691 (patch)
treef48ea2691c929f03e8af059f42d58ff0d1fceb7d /lib/private/Encryption
parent318d68a9a95cc710aa30c24a84d78da280327aef (diff)
downloadnextcloud-server-351cab6bce41b53f9efd4ba9aed4e7435f843691.tar.gz
nextcloud-server-351cab6bce41b53f9efd4ba9aed4e7435f843691.zip
skip shared files, if files get decrypted only for a specific user we shouldn't touch files owned by a different user.
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r--lib/private/Encryption/DecryptAll.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php
index 6e309b5c892..b84395b9e17 100644
--- a/lib/private/Encryption/DecryptAll.php
+++ b/lib/private/Encryption/DecryptAll.php
@@ -210,6 +210,10 @@ class DecryptAll {
while ($root = array_pop($directories)) {
$content = $this->rootView->getDirectoryContent($root);
foreach ($content as $file) {
+ // only decrypt files owned by the user
+ if($file->getStorage()->instanceOfStorage('OC\Files\Storage\Shared')) {
+ continue;
+ }
$path = $root . '/' . $file['name'];
if ($this->rootView->is_dir($path)) {
$directories[] = $path;