summaryrefslogtreecommitdiff
path: root/inc/init.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-08-02 00:21:59 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-08-02 00:21:59 +0200
commit656c8fb3f2b288d406251fc93d9eb0ca774a3141 (patch)
tree8132c81c6cd94fba78b06a53a16f8c5b92a03f21 /inc/init.php
parentac2b8f3e0e969eed680d73502c2ae44e3e09dc96 (diff)
downloadrpg-656c8fb3f2b288d406251fc93d9eb0ca774a3141.tar.gz
rpg-656c8fb3f2b288d406251fc93d9eb0ca774a3141.tar.bz2
Use the server port in DOKU_COOKIE when securecookie is defined FS#1664
Ignore-this: de9ef30fc53fbfc1caa74b55f97290a5 This should avoid problems on portbased virtual hosts. This patch might log you out ;-) darcs-hash:20090801222159-7ad00-808a91dd29af758ef10d7942888c2c22d8b8b888.gz
Diffstat (limited to 'inc/init.php')
-rw-r--r--inc/init.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/init.php b/inc/init.php
index f642c8dcf..d84c5a232 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -144,8 +144,8 @@
if(!defined('DOKU_LF')) define ('DOKU_LF',"\n");
if(!defined('DOKU_TAB')) define ('DOKU_TAB',"\t");
- // define cookie and session id
- if (!defined('DOKU_COOKIE')) define('DOKU_COOKIE', 'DW'.md5(DOKU_REL));
+ // define cookie and session id, append server port when securecookie is configured FS#1664
+ if (!defined('DOKU_COOKIE')) define('DOKU_COOKIE', 'DW'.md5(DOKU_REL.(($conf['securecookie'])?$_SERVER['SERVER_PORT']:'')));
// define Plugin dir
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');