Skip to content

Commit d6a9a71

Browse files
ChristophWurstbackportbot[bot]
authored andcommitted
fix(auth): log invalid token during password reset
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
1 parent e883c95 commit d6a9a71

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

core/Controller/LostController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ protected function checkPasswordResetToken(string $token, string $userId): void
129129
$user = $this->userManager->get($userId);
130130
$this->verificationToken->check($token, $user, 'lostpassword', $user ? $user->getEMailAddress() : '', true);
131131
} catch (InvalidTokenException $e) {
132+
$this->logger->warning('Password reset token check failed', [
133+
'user' => $userId,
134+
'code' => $e->getCode(),
135+
'exception' => $e,
136+
]);
132137
$error = $e->getCode() === InvalidTokenException::TOKEN_EXPIRED
133138
? $this->l10n->t('Could not reset password because the token is expired')
134139
: $this->l10n->t('Could not reset password because the token is invalid');

0 commit comments

Comments
 (0)