Commit dcbda2eb authored by Kevin Atkinson's avatar Kevin Atkinson
Browse files

Merge commit 'e435f201' into devel

parents c88e7007 e435f201
......@@ -947,7 +947,7 @@ function DOLOGIN($token, $password, $adminmode = 0) {
function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
{
global $TBAUTHCOOKIE, $TBAUTHDOMAIN, $TBAUTHTIMEOUT;
global $TBAUTHCOOKIE, $TBAUTHDOMAIN, $TBAUTHTIMEOUT, $WWWHOST;
global $TBNAMECOOKIE, $TBLOGINCOOKIE, $TBSECURECOOKIES, $TBEMAILCOOKIE;
global $TBMAIL_OPS, $TBMAIL_AUDIT, $TBMAIL_WWW;
global $WIKISUPPORT, $WIKICOOKIENAME;
......@@ -987,7 +987,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
# at the server so it will become invalid at some point.
#
setcookie($TBAUTHCOOKIE, $hashkey, 0, "/",
$TBAUTHDOMAIN, $TBSECURECOOKIES);
$WWWHOST, $TBSECURECOOKIES);
#
# Another cookie, to help in menu generation. See above in
......@@ -996,14 +996,14 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
# All this does is change the menu options presented, imparting
# no actual privs.
#
setcookie($TBLOGINCOOKIE, $crc, 0, "/", $TBAUTHDOMAIN, 0);
setcookie($TBLOGINCOOKIE, $crc, 0, "/", $WWWHOST, 0);
#
# We want to remember who the user was each time they load a page
# NOTE: This cookie is integral to authorization, since we do not pass
# around the UID anymore, but look for it in the cookie.
#
setcookie($TBNAMECOOKIE, $uid_idx, 0, "/", $TBAUTHDOMAIN, 0);
setcookie($TBNAMECOOKIE, $uid_idx, 0, "/", $WWWHOST, 0);
#
# This is a long term cookie so we can remember who the user was, and
......@@ -1011,7 +1011,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
#
if ($email) {
$timeout = $now + (60 * 60 * 24 * 365);
setcookie($TBEMAILCOOKIE, $email, $timeout, "/", $TBAUTHDOMAIN, 0);
setcookie($TBEMAILCOOKIE, $email, $timeout, "/", $WWWHOST, 0);
}
#
......@@ -1082,7 +1082,7 @@ function VERIFYPASSWD($uid, $password) {
#
function DOLOGOUT($user) {
global $CHECKLOGIN_STATUS, $CHECKLOGIN_USER;
global $TBAUTHCOOKIE, $TBLOGINCOOKIE, $TBAUTHDOMAIN;
global $TBAUTHCOOKIE, $TBLOGINCOOKIE, $TBAUTHDOMAIN, $WWWHOST;
global $WIKISUPPORT, $WIKICOOKIENAME, $HTTP_COOKIE_VARS;
global $BUGDBSUPPORT, $BUGDBCOOKIENAME, $TRACSUPPORT, $TRACCOOKIENAME;
......@@ -1140,8 +1140,8 @@ function DOLOGOUT($user) {
#
$timeout = time() - 3600;
setcookie($TBAUTHCOOKIE, "", $timeout, "/", $TBAUTHDOMAIN, 0);
setcookie($TBLOGINCOOKIE, "", $timeout, "/", $TBAUTHDOMAIN, 0);
setcookie($TBAUTHCOOKIE, "", $timeout, "/", $WWWHOST, 0);
setcookie($TBLOGINCOOKIE, "", $timeout, "/", $WWWHOST, 0);
if ($TRACSUPPORT) {
setcookie("trac_auth_emulab", "", $timeout, "/",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment