diff --git a/CHANGELOG b/CHANGELOG index 72533e600..dee23fe15 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,6 +33,7 @@ CHANGELOG Roundcube Webmail - Fix handling keyservers configured with protocol prefix (#7295) - Markasjunk: Fix marking as spam/ham on moving messages with Move menu (#7189) - Markasjunk: Fix bug where moving to Junk was failing on messages selected with Select > All (#7206) +- Fix bug where session was destoryed with window close (#7251) RELEASE 1.4.3 ------------- diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 55340a6c1..df387c86d 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -463,8 +463,7 @@ class rcube ini_set('session.gc_maxlifetime', $lifetime * 2); } - // set session cookie lifetime so it never expires (#5961) - ini_set('session.cookie_lifetime', 0); + ini_set('session.cookie_lifetime', $lifetime); ini_set('session.cookie_secure', $is_secure); ini_set('session.name', $sess_name ?: 'roundcube_sessid'); ini_set('session.use_cookies', 1); diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php index 59522a9d7..e00a36c25 100644 --- a/program/lib/Roundcube/rcube_session.php +++ b/program/lib/Roundcube/rcube_session.php @@ -694,7 +694,7 @@ abstract class rcube_session public function set_auth_cookie() { $this->cookie = $this->_mkcookie($this->now); - rcube_utils::setcookie($this->cookiename, $this->cookie, 0); + rcube_utils::setcookie($this->cookiename, $this->cookie, time() + $this->lifetime); $_COOKIE[$this->cookiename] = $this->cookie; }