diff options
Diffstat (limited to 'apps/encryption/lib/recovery.php')
-rw-r--r-- | apps/encryption/lib/recovery.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/encryption/lib/recovery.php b/apps/encryption/lib/recovery.php index 5c1e91866a0..cfaa3e49619 100644 --- a/apps/encryption/lib/recovery.php +++ b/apps/encryption/lib/recovery.php @@ -135,8 +135,9 @@ class Recovery { $recoveryKey = $this->keyManager->getSystemPrivateKey($this->keyManager->getRecoveryKeyId()); $decryptedRecoveryKey = $this->crypt->decryptPrivateKey($recoveryKey, $oldPassword); $encryptedRecoveryKey = $this->crypt->symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword); + $header = $this->crypt->generateHeader(); if ($encryptedRecoveryKey) { - $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $encryptedRecoveryKey); + $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header . $encryptedRecoveryKey); return true; } return false; |