summaryrefslogtreecommitdiffstats
path: root/lib/private/encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-05-21 14:07:42 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-05-22 15:41:28 +0200
commitc63f2286c06e94926a8af738397c18c3bb1ff4ea (patch)
tree5fa2de556e6d7a7a3c4fc97f5f66317b01fcb845 /lib/private/encryption
parent38bceb0d744357fc25cf0353989aa59f1bdcf11c (diff)
downloadnextcloud-server-c63f2286c06e94926a8af738397c18c3bb1ff4ea.tar.gz
nextcloud-server-c63f2286c06e94926a8af738397c18c3bb1ff4ea.zip
copy keys before we move a file between storages to make sure that the new target file reuses the old file key, otherwise versions will break
Diffstat (limited to 'lib/private/encryption')
-rw-r--r--lib/private/encryption/manager.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php
index 45f45045643..cf9635e15d3 100644
--- a/lib/private/encryption/manager.php
+++ b/lib/private/encryption/manager.php
@@ -26,6 +26,7 @@ use OC\Files\Filesystem;
use OC\Files\Storage\Shared;
use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\View;
+use OC\Search\Provider\File;
use OCP\Encryption\IEncryptionModule;
use OCP\Encryption\IManager;
use OCP\Files\Mount\IMountPoint;
@@ -217,6 +218,7 @@ class Manager implements IManager {
);
$user = \OC::$server->getUserSession()->getUser();
$logger = \OC::$server->getLogger();
+ $mountManager = Filesystem::getMountManager();
$uid = $user ? $user->getUID() : null;
$fileHelper = \OC::$server->getEncryptionFilesHelper();
$keyStorage = \OC::$server->getEncryptionKeyStorage();
@@ -236,7 +238,8 @@ class Manager implements IManager {
$fileHelper,
$uid,
$keyStorage,
- $update
+ $update,
+ $mountManager
);
} else {
return $storage;