From 35afb0d22e41c195ba8ac4a7dc942ba4b0b97d42 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sun, 1 Feb 2015 17:07:10 +0100 Subject: [PATCH] Default to `null` for lostpassword We oC 8 we use the `StringUtils::equals` method which will also verify the type, since we don't anylonger hash the token twice this is required in case somebody is able to invoke this route with an empty `$token`. --- core/lostpassword/controller/lostcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lostpassword/controller/lostcontroller.php b/core/lostpassword/controller/lostcontroller.php index aee4001ed37..5297e9a9a2a 100644 --- a/core/lostpassword/controller/lostcontroller.php +++ b/core/lostpassword/controller/lostcontroller.php @@ -148,7 +148,7 @@ class LostController extends Controller { try { $user = $this->userManager->get($userId); - if (!StringUtils::equals($this->config->getUserValue($userId, 'owncloud', 'lostpassword'), $token)) { + if (!StringUtils::equals($this->config->getUserValue($userId, 'owncloud', 'lostpassword', null), $token)) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } -- 2.39.5