From 4130f279b20864eb3f5fcf7b6547615d8d66101c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Jacquin?= Date: Sun, 20 May 2018 12:51:50 +0200 Subject: [PATCH] Fix translation bug on lost password page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix nextcloud/password_policy#26 Signed-off-by: Rémy Jacquin --- core/Controller/LostController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 86f9e7478e397..7f60be03b71f2 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -30,6 +30,7 @@ namespace OC\Core\Controller; +use OC\HintException; use \OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use \OCP\AppFramework\Http\TemplateResponse; @@ -274,6 +275,8 @@ public function setPassword($token, $userId, $password, $proceed) { $this->config->deleteUserValue($userId, 'core', 'lostpassword'); @\OC_User::unsetMagicInCookie(); + } catch (HintException $e){ + return $this->error($e->getHint()); } catch (\Exception $e){ return $this->error($e->getMessage()); }