From 04e1cab5eed84081c0bf2381e745cc3d28330c2f 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 90a1176ae8311..f45de3653eab4 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -31,6 +31,7 @@ namespace OC\Core\Controller; +use OC\HintException; use \OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use \OCP\AppFramework\Http\TemplateResponse; @@ -275,6 +276,8 @@ public function setPassword($token, $userId, $password, $proceed) { $this->config->deleteUserValue($userId, 'core', 'lostpassword'); @\OC::$server->getUserSession()->unsetMagicInCookie(); + } catch (HintException $e){ + return $this->error($e->getHint()); } catch (\Exception $e){ return $this->error($e->getMessage()); }