]> source.dussan.org Git - nextcloud-server.git/commitdiff
Default to `null` for lostpassword
authorLukas Reschke <lukas@owncloud.com>
Sun, 1 Feb 2015 16:07:10 +0000 (17:07 +0100)
committerLukas Reschke <lukas@owncloud.com>
Sun, 1 Feb 2015 16:07:10 +0000 (17:07 +0100)
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

index aee4001ed37057acbcf5cc230122c9fa0a4054a6..5297e9a9a2a4a60951d11086c40e5edce0248df4 100644 (file)
@@ -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'));
                        }