summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-07-25 10:06:44 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-07-25 10:06:44 +0000
commitdfcbe0591a86fb8f62d9762d9bdb4d96d3a953d4 (patch)
tree1565ac991ce195b9d3b35f14dad8fdeb1217b965 /includes
parente3fa6893c2ff67dc9ce2ac8a1a8cf81d8da03445 (diff)
downloadbrdo-dfcbe0591a86fb8f62d9762d9bdb4d96d3a953d4.tar.gz
brdo-dfcbe0591a86fb8f62d9762d9bdb4d96d3a953d4.tar.bz2
#160107 by JohnAlbin: use the same session ID regardless of the protocol used to access the page (eg share sessions between http and https pages)
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 6683371cd..1154b84ae 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -299,8 +299,9 @@ function conf_init() {
$session_name = $cookie_domain;
}
else {
- // Otherwise use $base_url for session name.
- $session_name = $base_url;
+ // Otherwise use $base_url as session name, without the protocol
+ // to use the same session identifiers across http and https.
+ list( , $session_name) = explode('://', $base_url, 2);
// We try to set the cookie domain to the hostname.
if (!empty($_SERVER['HTTP_HOST'])) {
$cookie_domain = $_SERVER['HTTP_HOST'];