aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks/hooks.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-07-08 13:07:05 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-07-08 13:07:05 +0200
commit064ac77e449ac4227d2c973ba1c96be4fec6ffbc (patch)
tree2f3a51d6b22172f5729b8d456bcd433100d8805e /apps/files_encryption/hooks/hooks.php
parent687cd7fe83fc40d7bc7d2ba7df5b495bf7bebdca (diff)
downloadnextcloud-server-064ac77e449ac4227d2c973ba1c96be4fec6ffbc.tar.gz
nextcloud-server-064ac77e449ac4227d2c973ba1c96be4fec6ffbc.zip
Kill legacy encryption migration
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r--apps/files_encryption/hooks/hooks.php16
1 files changed, 1 insertions, 15 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index d4a98410a37..8f3ae21fd56 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -97,23 +97,9 @@ class Hooks {
// If migration not yet done
if ($ready) {
- $userView = new \OC\Files\View('/' . $params['uid']);
-
- // Set legacy encryption key if it exists, to support
- // depreciated encryption system
- if ($userView->file_exists('encryption.key')) {
- $encLegacyKey = $userView->file_get_contents('encryption.key');
- if ($encLegacyKey) {
-
- $plainLegacyKey = Crypt::legacyDecrypt($encLegacyKey, $params['password']);
-
- $session->setLegacyKey($plainLegacyKey);
- }
- }
-
// Encrypt existing user files
try {
- $result = $util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password']);
+ $result = $util->encryptAll('/' . $params['uid'] . '/' . 'files');
} catch (\Exception $ex) {
\OCP\Util::writeLog('Encryption library', 'Initial encryption failed! Error: ' . $ex->getMessage(), \OCP\Util::FATAL);
$result = false;