diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-08-18 13:00:52 +0300 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-08-18 13:00:52 +0300 |
commit | fb9576df9e9ce3cb1d67e40a95f614c4c8dc6510 (patch) | |
tree | ddd381c233fe7314bb2c7b90326b12bc1f27eaf7 /lib | |
parent | d4ec50c6374809635d6bc36b797a36b099d13654 (diff) |
[stable9.1] Dont decrypt shared files (#25831)
* Take from https://github.com/nextcloud/server/pull/608/commits/351cab6bce41b53f9efd4ba9aed4e7435f843691 - THX @schiessle
* Fix unit tests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Encryption/DecryptAll.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php index 34a3e1bff91..376cdd3d5aa 100644 --- a/lib/private/Encryption/DecryptAll.php +++ b/lib/private/Encryption/DecryptAll.php @@ -206,6 +206,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; |