diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 7511bfdc8..2e61e4e44 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -85,7 +85,7 @@ class Bootstrap } // default configuration - $config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M", 'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en', 'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5); + $config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M", 'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en', 'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5, 'ie_cookie_lifetime' => 1); // read the global env.ini configuration file if ($readGlobalIniFile && ($globalConf = @parse_ini_file($globalIniFile)) !== false) { diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 4f5f50af4..93793bd0c 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -280,7 +280,9 @@ if (is_null($timelife)) { $timelife = 1440; } ini_set('session.gc_maxlifetime', $timelife); -ini_set('session.cookie_lifetime', $timelife); +if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { + ini_set('session.cookie_lifetime', $timelife); +} session_start(); @@ -881,10 +883,12 @@ if (! defined( 'EXECUTE_BY_CRON' )) { define( 'SYS_LANG_DIRECTION', $oServerConf->getLanDirection() ); if ((isset( $_SESSION['USER_LOGGED'] )) && (! (isset( $_GET['sid'] )))) { - if (PHP_VERSION < 5.2) { - setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); - } else { - setcookie(session_name(), session_id(), time() + $timelife, '/', null, false, true); + if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { + if (PHP_VERSION < 5.2) { + setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); + } else { + setcookie(session_name(), session_id(), time() + $timelife, '/', null, false, true); + } } $RBAC->initRBAC(); //using optimization with memcache, the user data will be in memcache 8 hours, or until session id goes invalid @@ -948,10 +952,12 @@ if (! defined( 'EXECUTE_BY_CRON' )) { $_SESSION['USER_LOGGED'] = $aUser['USR_UID']; $_SESSION['USR_USERNAME'] = $aUser['USR_USERNAME']; $bRedirect = false; - if (PHP_VERSION < 5.2) { - setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); - } else { - setcookie(session_name(), session_id(), time() + $timelife, '/', null, false, true); + if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { + if (PHP_VERSION < 5.2) { + setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); + } else { + setcookie(session_name(), session_id(), time() + $timelife, '/', null, false, true); + } } $RBAC->initRBAC(); $RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] );