Merge pull request #11857 from nextcloud/backport/10942/longer-password-reset-time

[stable13] Change password expiration time from 12h to 7d
This commit is contained in:
Roeland Jago Douma 2018-10-17 22:14:31 +02:00 committed by GitHub
commit e3a2b9e3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ class LostController extends Controller {
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'));
}

View File

@ -584,7 +584,7 @@ class LostControllerTest extends \Test\TestCase {
->with('ValidTokenUser')
->willReturn($this->existingUser);
$this->timeFactory->method('getTime')
->willReturn(55546);
->willReturn(617146);
$this->crypto->method('decrypt')
->with(