From 8b355788333f9078066b3f877c4e5c1c4001597c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 27 May 2013 12:02:27 +0200 Subject: [PATCH] fix migration from old to new encryption --- apps/files_encryption/hooks/hooks.php | 2 -- apps/files_encryption/lib/crypt.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 2066300a16..07072fb8c4 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -81,8 +81,6 @@ class Hooks { $session->setLegacyKey( $plainLegacyKey ); } - - $publicKey = Keymanager::getPublicKey( $view, $params['uid'] ); // Encrypt existing user files: // This serves to upgrade old versions of the encryption diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index f5b7a8a0a4..009a648016 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -613,7 +613,7 @@ class Crypt $decrypted = $bf->decrypt( $content ); - return rtrim( $decrypted, "\0" );; + return $decrypted; }