diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/main.inc.php.dist | 3 | ||||
-rw-r--r-- | program/include/rcmail.php | 11 |
3 files changed, 11 insertions, 4 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add option to set session name (#1486433) - Add option to skip alternative email addresses in autocompletion - Fix inconsistent behaviour of Compose button in Drafts folder, add Edit button for drafts - Fix problem with parsing HTML message body with non-unicode characters (#1487813) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index 1c3677f1b..d07a3b3c2 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -222,6 +222,9 @@ $rcmail_config['session_lifetime'] = 10; // session domain: .example.org $rcmail_config['session_domain'] = ''; +// session name. Default: 'roundcube_sessid' +$rcmail_config['session_name'] = null; + // Backend to use for session storage. Can either be 'db' (default) or 'memcache' // If set to memcache, a list of servers need to be specified in 'memcache_hosts' // Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 969e101f7..e06594fcd 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -678,18 +678,21 @@ class rcmail if (session_id()) return; + $sess_name = $this->config->get('session_name'); + $sess_domain = $this->config->get('session_domain'); + $lifetime = $this->config->get('session_lifetime', 0) * 60; + // set session domain - if ($domain = $this->config->get('session_domain')) { - ini_set('session.cookie_domain', $domain); + if ($sess_domain) { + ini_set('session.cookie_domain', $sess_domain); } // set session garbage collecting time according to session_lifetime - $lifetime = $this->config->get('session_lifetime', 0) * 60; if ($lifetime) { ini_set('session.gc_maxlifetime', $lifetime * 2); } ini_set('session.cookie_secure', rcube_https_check()); - ini_set('session.name', 'roundcube_sessid'); + ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid'); ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); ini_set('session.serialize_handler', 'php'); |