diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-08-31 14:13:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 14:13:14 +0200 |
commit | f4ffa1737eaef0e90f88537245e27adaf2277074 (patch) | |
tree | 38c7d71548724d97a45c9640552ebe029920808e | |
parent | 2a2261587921c80123b5077d16fcbde2a45c1a95 (diff) | |
parent | cf3f4888ccd403f1d27026d9dbfa061e4bc379e6 (diff) | |
download | nextcloud-server-f4ffa1737eaef0e90f88537245e27adaf2277074.tar.gz nextcloud-server-f4ffa1737eaef0e90f88537245e27adaf2277074.zip |
Merge pull request #10942 from nextcloud/feature/10776/longer-password-reset-time
Change password expiration time from 12h to 7d
-rw-r--r-- | core/Controller/LostController.php | 2 | ||||
-rw-r--r-- | tests/Core/Controller/LostControllerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index eacd5847c6c..ab5a10b8035 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -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')); } diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index d6afa5959a0..cfaa8e712fa 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -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( |