summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/session.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index 603f384bb..ad66f0c40 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -184,7 +184,8 @@ function rcube_sess_regenerate_id()
$lifetime = $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0;
setcookie(session_name(), '', time() - 3600);
- setcookie(session_name(), $random, $lifetime, $cookie['path'], $cookie['domain']);
+ setcookie(session_name(), $random, $lifetime, $cookie['path'], $cookie['domain'],
+ $_SERVER['HTTPS'] && ($_SERVER['HTTPS']!='off'));
return true;
}