Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/Controller/LostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ protected function checkPasswordResetToken($token, $userId) {
throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid'));
}

if ($splittedToken[0] < ($this->timeFactory->getTime() - 60*60*12) ||
if ($splittedToken[0] < ($this->timeFactory->getTime() - 60*60*24*7) ||
$user->getLastLogin() > $splittedToken[0]) {
throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is expired'));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Controller/LostControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public function testSetPasswordExpiredToken() {
->with('ValidTokenUser')
->willReturn($this->existingUser);
$this->timeFactory->method('getTime')
->willReturn(55546);
->willReturn(617146);

$this->crypto->method('decrypt')
->with(
Expand Down