diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-06-28 15:17:54 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-06-28 15:17:54 +0200 |
commit | 3b91ce695f784fc68d3bdfff0fe5ed0c37a89aff (patch) | |
tree | 428443d4884e1b037556f24b5fbec6fa26ca4384 /lib/base.php | |
parent | 794c189650d8eb2068da3a5df6ccd22966ee7f38 (diff) | |
download | nextcloud-server-3b91ce695f784fc68d3bdfff0fe5ed0c37a89aff.tar.gz nextcloud-server-3b91ce695f784fc68d3bdfff0fe5ed0c37a89aff.zip |
session_life_time -> session_lifetime
default session_lifetime is 24hrs
recreation of session is triggered at 50% of the session life time
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 7097a376d6e..af54f439155 100644 --- a/lib/base.php +++ b/lib/base.php @@ -315,7 +315,7 @@ class OC { // regenerate session id periodically to avoid session fixation if (!self::$session->exists('SID_CREATED')) { self::$session->set('SID_CREATED', time()); - } else if (time() - self::$session->get('SID_CREATED') > $sessionLifeTime) { + } else if (time() - self::$session->get('SID_CREATED') > $sessionLifeTime / 2) { session_regenerate_id(true); self::$session->set('SID_CREATED', time()); } @@ -337,7 +337,7 @@ class OC { * @return int */ private static function getSessionLifeTime() { - return OC_Config::getValue('session_life_time', 60 * 60 * 12); + return OC_Config::getValue('session_lifetime', 60 * 60 * 24); } public static function getRouter() { |