From e71ce681bdae620477f46591279412a0143b6b0e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 3 Oct 2006 14:15:46 +0200 Subject: use DOKU_URL as key for sessions and auth cookie #896 #581 #884 This patch changes the DOKU_COOKIE define to be based on the DOKU_URL define. DOKU_COOKIE is now used as session key as well, making sessions no longer dependend on the title option. This should fix problems with multiple wikis on the same host (using the same title) and wikis accessed through different URLs. darcs-hash:20061003121546-7ad00-aea4c256b7752815ed422ce74a659152a601d267.gz --- inc/auth/basic.class.php | 6 +++--- inc/auth/punbb.class.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'inc/auth') diff --git a/inc/auth/basic.class.php b/inc/auth/basic.class.php index faffa4cea..79fb04a1c 100644 --- a/inc/auth/basic.class.php +++ b/inc/auth/basic.class.php @@ -147,9 +147,9 @@ class auth_basic { # $USERINFO['mail'] = 'FIXME'; # $USERINFO['grps'] = array('FIXME'); # $_SERVER['REMOTE_USER'] = $user; -# $_SESSION[$conf['title']]['auth']['user'] = $user; -# $_SESSION[$conf['title']]['auth']['pass'] = $pass; -# $_SESSION[$conf['title']]['auth']['info'] = $USERINFO; +# $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; +# $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass; +# $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; # return true; } diff --git a/inc/auth/punbb.class.php b/inc/auth/punbb.class.php index fb9b905ff..7cef0d733 100644 --- a/inc/auth/punbb.class.php +++ b/inc/auth/punbb.class.php @@ -141,8 +141,8 @@ class auth_punbb extends auth_mysql { $USERINFO['grps'] = array($pun_user['g_title']); $_SERVER['REMOTE_USER'] = $pun_user['username']; - $_SESSION[$conf['title']]['auth']['user'] = $pun_user['username']; - $_SESSION[$conf['title']]['auth']['info'] = $USERINFO; + $_SESSION[DOKU_COOKIE]['auth']['user'] = $pun_user['username']; + $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; return true; } -- cgit v1.2.3