From f6423f74e3ca925fd43c67f2669384994ccc55fe Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 29 Aug 2016 21:17:16 +0200 Subject: Minor cleanup in core Controllers --- core/Controller/LostController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/Controller/LostController.php') diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index fe6be1e6852..b1111559a6c 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -40,7 +40,6 @@ use \OCP\IConfig; use OCP\IUserManager; use OCP\Mail\IMailer; use OCP\Security\ISecureRandom; -use OCP\Security\StringUtils; /** * Class LostController @@ -144,7 +143,7 @@ class LostController extends Controller { } /** - * @param string $userId + * @param string $token * @param string $userId * @throws \Exception */ @@ -161,7 +160,7 @@ class LostController extends Controller { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is expired')); } - if (!StringUtils::equals($splittedToken[1], $token)) { + if (!hash_equals($splittedToken[1], $token)) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } } -- cgit v1.2.3