1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Set secure cookie when SSL active.

This commit is contained in:
Cameron
2018-01-13 12:38:32 -08:00
parent a37758957c
commit f05a0fd777

View File

@@ -214,6 +214,11 @@ class e_session
$options['lifetime'] = (integer) e107::getPref('session_lifetime', 86400); //
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); //
if(!empty($options['secure']))
{
ini_set('session.cookie_secure', 1);
}
}
if(defined('SESSION_SAVE_PATH')) // safer than a pref.