diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Core/Session.php | 11 | ||||
-rw-r--r-- | app/constants.php | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/app/Core/Session.php b/app/Core/Session.php index 0e5f7426..df0ec5f7 100644 --- a/app/Core/Session.php +++ b/app/Core/Session.php @@ -13,15 +13,6 @@ use ArrayAccess; class Session implements ArrayAccess { /** - * Sesion lifetime - * - * http://php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime - * - * @var integer - */ - const SESSION_LIFETIME = 0; // Until the browser is closed - - /** * Return true if the session is open * * @static @@ -43,7 +34,7 @@ class Session implements ArrayAccess { // HttpOnly and secure flags for session cookie session_set_cookie_params( - self::SESSION_LIFETIME, + SESSION_DURATION, $base_path ?: '/', null, Request::isHTTPS(), diff --git a/app/constants.php b/app/constants.php index e232aba6..e73e7b1a 100644 --- a/app/constants.php +++ b/app/constants.php @@ -93,3 +93,7 @@ defined('HIDE_LOGIN_FORM') or define('HIDE_LOGIN_FORM', false); defined('BRUTEFORCE_CAPTCHA') or define('BRUTEFORCE_CAPTCHA', 3); defined('BRUTEFORCE_LOCKDOWN') or define('BRUTEFORCE_LOCKDOWN', 6); defined('BRUTEFORCE_LOCKDOWN_DURATION') or define('BRUTEFORCE_LOCKDOWN_DURATION', 15); + +// Session duration in second (0 = until the browser is closed) +// See http://php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime +defined('SESSION_DURATION') or define('SESSION_DURATION', 0); |