summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-01-13 11:28:43 +0100
committerGitHub <noreply@github.com>2017-01-13 11:28:43 +0100
commit622101f2dd43f618fa278976e38df8541f145bb6 (patch)
tree4e16e7c1839079b46334767659e3f4cf841b17cd /core/Controller
parent00c3f807db59f69cac37429f1b4be424720371e3 (diff)
parentfcda3a20f455795b898161ec4ada0aeb500b9218 (diff)
downloadnextcloud-server-622101f2dd43f618fa278976e38df8541f145bb6.tar.gz
nextcloud-server-622101f2dd43f618fa278976e38df8541f145bb6.zip
Merge pull request #2918 from nextcloud/encryption-recovery-improvements
create new encryption keys on password reset and backup the old one
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/LostController.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php
index b12abf38142..a0ef87e50d8 100644
--- a/core/Controller/LostController.php
+++ b/core/Controller/LostController.php
@@ -234,6 +234,8 @@ class LostController extends Controller {
$this->checkPasswordResetToken($token, $userId);
$user = $this->userManager->get($userId);
+ \OC_Hook::emit('\OC\Core\LostPassword\Controller\LostController', 'pre_passwordReset', array('uid' => $userId, 'password' => $password));
+
if (!$user->setPassword($password)) {
throw new \Exception();
}
@@ -242,11 +244,6 @@ class LostController extends Controller {
$this->config->deleteUserValue($userId, 'core', 'lostpassword');
@\OC_User::unsetMagicInCookie();
- } catch (PrivateKeyMissingException $e) {
- // in this case it is OK if we couldn't reset the users private key
- // They chose explicitely to continue at the password reset dialog
- // (see $proceed flag)
- return $this->success();
} catch (\Exception $e){
return $this->error($e->getMessage());
}