[Pkg-owncloud-commits] [owncloud] 91/223: add proper Exception message for invalid token
David Prévot
taffit at moszumanska.debian.org
Sun Jun 22 01:54:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit dda5e6c85bb40bd38ce2d323bf30a9e8cd18d4cf
Author: Morris Jobke <hey at morrisjobke.de>
Date: Fri Jun 13 16:18:58 2014 +0200
add proper Exception message for invalid token
---
core/lostpassword/controller/lostcontroller.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/lostpassword/controller/lostcontroller.php b/core/lostpassword/controller/lostcontroller.php
index 0212332..b1be65b 100644
--- a/core/lostpassword/controller/lostcontroller.php
+++ b/core/lostpassword/controller/lostcontroller.php
@@ -106,8 +106,11 @@ class LostController extends Controller {
try {
$user = $this->userManager->get($userId);
- if (!$this->checkToken($userId, $token) ||
- !$user->setPassword($userId, $password)) {
+ if (!$this->checkToken($userId, $token)) {
+ throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid'));
+ }
+
+ if (!$user->setPassword($userId, $password)) {
throw new \Exception();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list