diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-08-22 20:42:45 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-08-22 20:42:45 +0200 |
commit | db4cb1dd4d1266c3284052fcbbfc0acc042485a2 (patch) | |
tree | 1043ff59bd7785f0ec0bf5777dac327f34cdc3df /core/application.php | |
parent | 510010e774c4019b7fc616c90085649abb7afac3 (diff) | |
download | nextcloud-server-db4cb1dd4d1266c3284052fcbbfc0acc042485a2.tar.gz nextcloud-server-db4cb1dd4d1266c3284052fcbbfc0acc042485a2.zip |
Expire token after 12h and if user logged-in again
As an hardening measure we should expire password reset tokens after 12h and if the user has logged-in again successfully after the token was requested.
Diffstat (limited to 'core/application.php')
-rw-r--r-- | core/application.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/application.php b/core/application.php index 373965e7fd7..12ec6b63fd4 100644 --- a/core/application.php +++ b/core/application.php @@ -27,6 +27,7 @@ namespace OC\Core; use OC\AppFramework\Utility\SimpleContainer; +use OC\AppFramework\Utility\TimeFactory; use \OCP\AppFramework\App; use OC\Core\LostPassword\Controller\LostController; use OC\Core\User\UserController; @@ -63,7 +64,8 @@ class Application extends App { $c->query('SecureRandom'), $c->query('DefaultEmailAddress'), $c->query('IsEncryptionEnabled'), - $c->query('Mailer') + $c->query('Mailer'), + $c->query('TimeFactory') ); }); $container->registerService('UserController', function(SimpleContainer $c) { @@ -120,15 +122,15 @@ class Application extends App { $container->registerService('UserFolder', function(SimpleContainer $c) { return $c->query('ServerContainer')->getUserFolder(); }); - - - $container->registerService('Defaults', function() { return new \OC_Defaults; }); $container->registerService('Mailer', function(SimpleContainer $c) { return $c->query('ServerContainer')->getMailer(); }); + $container->registerService('TimeFactory', function(SimpleContainer $c) { + return new TimeFactory(); + }); $container->registerService('DefaultEmailAddress', function() { return Util::getDefaultEmailAddress('lostpassword-noreply'); }); |