Merge pull request #448 from IainKay/Issue-447

Issue 447
This commit is contained in:
Sebastian Grewe 2013-07-11 21:42:10 -07:00
commit dca14886de
2 changed files with 3 additions and 5 deletions

View File

@ -353,8 +353,7 @@ $config['memcache']['splay'] = 15;
*
* You can configure the cookie behaviour to secure your cookies more than the PHP defaults
*
* For multiple installations of mmcfe-ng on the same domain you must change the cookie
* path or change the cookie name to avoid conflicts.
* For multiple installations of mmcfe-ng on the same domain you must change the cookie path.
*
* Explanation:
* duration:
@ -384,14 +383,12 @@ $config['memcache']['splay'] = 15;
* duration = '1440'
* domain = ''
* path = '/'
* name = 'POOLERCOOKIE'
* httponly = true
* secure = false
**/
$config['cookie']['duration'] = '1440';
$config['cookie']['domain'] = '';
$config['cookie']['path'] = '/';
$config['cookie']['name'] = 'POOLERCOOKIE';
$config['cookie']['httponly'] = true;
$config['cookie']['secure'] = false;

View File

@ -28,8 +28,9 @@ define("SECURITY", 1);
if (!include_once(BASEPATH . 'include/config/global.inc.php')) die('Unable to load site configuration');
// Start a session
session_set_cookie_params($config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
session_start();
setcookie(session_name(),session_id(),time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
$session_id = session_id();
// Load Classes, they name defines the $ variable used