diff --git a/program/lib/Roundcube/session/php.php b/program/lib/Roundcube/session/php.php index 6aebedb443..3d8bff19b8 100644 --- a/program/lib/Roundcube/session/php.php +++ b/program/lib/Roundcube/session/php.php @@ -81,8 +81,10 @@ public function __construct($config) #[Override] public function write_close() { - $_SESSION['__IP'] = $this->ip; - $_SESSION['__MTIME'] = time(); + if (!isset($_SESSION['__MTIME']) || (time() - $_SESSION['__MTIME']) > ($this->lifetime / 10)) { + $_SESSION['__IP'] = $this->ip; + $_SESSION['__MTIME'] = time(); + } parent::write_close(); }