diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-07 15:51:43 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-07 15:51:43 +0200 |
commit | 854fd63ea907a870f1916d266e18aaba97820e32 (patch) | |
tree | 8223f61c364316185d7b859b2bdb888fc7a421e1 /apps/encryption/hooks | |
parent | 62bc0e5264af50be48dbcbb720b7bd16e8d88df5 (diff) | |
download | nextcloud-server-854fd63ea907a870f1916d266e18aaba97820e32.tar.gz nextcloud-server-854fd63ea907a870f1916d266e18aaba97820e32.zip |
use uid as additional information for salt
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 71c0435d200..8b6f17bec6d 100644 --- a/apps/encryption/hooks/userhooks.php +++ b/apps/encryption/hooks/userhooks.php @@ -220,7 +220,7 @@ class UserHooks implements IHook { if ($user && $params['uid'] === $user->getUID() && $privateKey) { // Encrypt private key with new user pwd as passphrase - $encryptedPrivateKey = $this->crypt->encryptPrivateKey($privateKey, $params['password']); + $encryptedPrivateKey = $this->crypt->encryptPrivateKey($privateKey, $params['password'], $params['uid']); // Save private key if ($encryptedPrivateKey) { @@ -258,7 +258,7 @@ class UserHooks implements IHook { $this->keyManager->setPublicKey($user, $keyPair['publicKey']); // Encrypt private key with new password - $encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $newUserPassword); + $encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $newUserPassword, $user); if ($encryptedKey) { $this->keyManager->setPrivateKey($user, $this->crypt->generateHeader() . $encryptedKey); |