diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-28 12:57:30 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-28 13:00:09 +0200 |
commit | 7d05f387fb01c1b72ab6a21951f6d86d2bb99003 (patch) | |
tree | 8b0eb9839340dfb95d7233717f99a5518e23478b /apps/encryption/hooks | |
parent | 557b4a2cb0ae0367e5facb1e4be136de07ab8cff (diff) | |
download | nextcloud-server-7d05f387fb01c1b72ab6a21951f6d86d2bb99003.tar.gz nextcloud-server-7d05f387fb01c1b72ab6a21951f6d86d2bb99003.zip |
make sure that we create a header for the encrypted private key
Diffstat (limited to 'apps/encryption/hooks')
-rw-r--r-- | apps/encryption/hooks/userhooks.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/encryption/hooks/userhooks.php b/apps/encryption/hooks/userhooks.php index b09b8e7049a..a86b8662781 100644 --- a/apps/encryption/hooks/userhooks.php +++ b/apps/encryption/hooks/userhooks.php @@ -226,7 +226,7 @@ class UserHooks implements IHook { // Save private key if ($encryptedPrivateKey) { $this->keyManager->setPrivateKey($this->user->getUser()->getUID(), - $encryptedPrivateKey); + $this->crypt->generateHeader() . $encryptedPrivateKey); } else { $this->logger->error('Encryption could not update users encryption password'); } @@ -263,7 +263,7 @@ class UserHooks implements IHook { $newUserPassword); if ($encryptedKey) { - $this->keyManager->setPrivateKey($user, $encryptedKey); + $this->keyManager->setPrivateKey($user, $this->crypt->generateHeader() . $encryptedKey); if ($recoveryPassword) { // if recovery key is set we can re-encrypt the key files $this->recovery->recoverUsersFiles($recoveryPassword, $user); |