session_life_time -> session_lifetime

default session_lifetime is 24hrs
recreation of session is triggered at 50% of the session life time
This commit is contained in:
Thomas Mueller 2013-06-28 15:17:54 +02:00
parent 794c189650
commit 3b91ce695f
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ $CONFIG = array(
"remember_login_cookie_lifetime" => 60*60*24*15, "remember_login_cookie_lifetime" => 60*60*24*15,
/* Life time of a session after inactivity */ /* Life time of a session after inactivity */
"session_life_time" => 60 * 60 * 12, "session_lifetime" => 60 * 60 * 24,
/* Custom CSP policy, changing this will overwrite the standard policy */ /* Custom CSP policy, changing this will overwrite the standard policy */
"custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *", "custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",

View File

@ -315,7 +315,7 @@ class OC {
// regenerate session id periodically to avoid session fixation // regenerate session id periodically to avoid session fixation
if (!self::$session->exists('SID_CREATED')) { if (!self::$session->exists('SID_CREATED')) {
self::$session->set('SID_CREATED', time()); 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); session_regenerate_id(true);
self::$session->set('SID_CREATED', time()); self::$session->set('SID_CREATED', time());
} }
@ -337,7 +337,7 @@ class OC {
* @return int * @return int
*/ */
private static function getSessionLifeTime() { 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() { public static function getRouter() {