diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 1a50bb526..c4415c865 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, 'ie_cookie_lifetime' => 1); + $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, 'safari_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 ec6f6a11c..96dd851e8 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -285,7 +285,10 @@ if (is_null($timelife)) { $timelife = 1440; } ini_set('session.gc_maxlifetime', $timelife); -if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { +if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || + $config['ie_cookie_lifetime'] == 1) && + (!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) || + $config['safari_cookie_lifetime'] == 1)) { ini_set('session.cookie_lifetime', $timelife); } session_start(); @@ -888,7 +891,10 @@ if (! defined( 'EXECUTE_BY_CRON' )) { define( 'SYS_LANG_DIRECTION', $oServerConf->getLanDirection() ); if ((isset( $_SESSION['USER_LOGGED'] )) && (! (isset( $_GET['sid'] )))) { - if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { + if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || + $config['ie_cookie_lifetime'] == 1) && + (!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) || + $config['safari_cookie_lifetime'] == 1)) { if (PHP_VERSION < 5.2) { setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); } else { @@ -957,7 +963,10 @@ if (! defined( 'EXECUTE_BY_CRON' )) { $_SESSION['USER_LOGGED'] = $aUser['USR_UID']; $_SESSION['USR_USERNAME'] = $aUser['USR_USERNAME']; $bRedirect = false; - if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) { + if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || + $config['ie_cookie_lifetime'] == 1) && + (!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) || + $config['safari_cookie_lifetime'] == 1)) { if (PHP_VERSION < 5.2) { setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly'); } else {