gui: improved session handling

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2017-08-12 15:54:52 +02:00
parent 7e67db16ae
commit 7cdb016565
2 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,11 @@
<?php <?php
ini_set('session.cookie_httponly', true);
ini_set('session.use_strict_mode', 1);
ini_set('session.use_only_cookies', 1);
if(isset($_SERVER['HTTP_HOST'])) { ini_set('session.cookie_domain', $_SERVER['HTTP_HOST']); }
define('NORMAL', 1); define('NORMAL', 1);
define('DEBUG', 5); define('DEBUG', 5);
@ -32,6 +38,8 @@ $config['THEME'] = 'default';
$config['SITE_NAME'] = 'piler.yourdomain.com'; $config['SITE_NAME'] = 'piler.yourdomain.com';
$config['SITE_URL'] = 'http://piler.yourdomain.com/'; $config['SITE_URL'] = 'http://piler.yourdomain.com/';
$config['SESSION_EXPIRY'] = 3600;
$config['ENABLE_SAAS'] = 0; $config['ENABLE_SAAS'] = 0;
$config['CAPTCHA_FAILED_LOGIN_COUNT'] = 0; $config['CAPTCHA_FAILED_LOGIN_COUNT'] = 0;
@ -313,6 +321,8 @@ define('NOW', time());
require_once 'config-site.php'; require_once 'config-site.php';
ini_set('session.cookie_lifetime', $config['SESSION_EXPIRY']);
require($config['DIR_BASE'] . "/system/registry.php"); require($config['DIR_BASE'] . "/system/registry.php");
require($config['DIR_BASE'] . "/system/request.php"); require($config['DIR_BASE'] . "/system/request.php");

View File

@ -6,8 +6,6 @@ require(DIR_SYSTEM . "/front.php");
require(DIR_SYSTEM . "/language.php"); require(DIR_SYSTEM . "/language.php");
require(DIR_SYSTEM . "/loader.php"); require(DIR_SYSTEM . "/loader.php");
require(DIR_SYSTEM . "/model.php"); require(DIR_SYSTEM . "/model.php");
//require(DIR_SYSTEM . "/registry.php");
//require(DIR_SYSTEM . "/request.php");
require(DIR_SYSTEM . "/router.php"); require(DIR_SYSTEM . "/router.php");
require(DIR_SYSTEM . "/misc.php"); require(DIR_SYSTEM . "/misc.php");
@ -26,5 +24,3 @@ if(TSA_URL) {
date_default_timezone_set(TIMEZONE); date_default_timezone_set(TIMEZONE);
?>