Commit 2f63dfe6 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Clear trac authentication cookies when logging in to Emulab.

parent 9f63bc12
<?php <?php
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group. # Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
# #
...@@ -901,7 +901,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0) ...@@ -901,7 +901,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
global $TBNAMECOOKIE, $TBLOGINCOOKIE, $TBSECURECOOKIES, $TBEMAILCOOKIE; global $TBNAMECOOKIE, $TBLOGINCOOKIE, $TBSECURECOOKIES, $TBEMAILCOOKIE;
global $TBMAIL_OPS, $TBMAIL_AUDIT, $TBMAIL_WWW; global $TBMAIL_OPS, $TBMAIL_AUDIT, $TBMAIL_WWW;
global $WIKISUPPORT, $WIKICOOKIENAME; global $WIKISUPPORT, $WIKICOOKIENAME;
global $BUGDBSUPPORT, $BUGDBCOOKIENAME; global $BUGDBSUPPORT, $BUGDBCOOKIENAME, $TRACSUPPORT;
# Caller makes these checks too. # Caller makes these checks too.
if (!TBvalid_uid($uid)) { if (!TBvalid_uid($uid)) {
...@@ -984,6 +984,15 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0) ...@@ -984,6 +984,15 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
setcookie($BUGDBCOOKIENAME, "", $flushtime, "/", setcookie($BUGDBCOOKIENAME, "", $flushtime, "/",
$TBAUTHDOMAIN, $TBSECURECOOKIES); $TBAUTHDOMAIN, $TBSECURECOOKIES);
} }
# These cookie names are still in flux.
if ($TRACSUPPORT) {
$flushtime = time() - 1000000;
setcookie("trac_auth_emulab", "", $flushtime, "/",
$TBAUTHDOMAIN, $TBSECURECOOKIES);
setcookie("trac_auth_protogeni", "", $flushtime, "/",
$TBAUTHDOMAIN, $TBSECURECOOKIES);
}
DBQueryFatal("update users set ". DBQueryFatal("update users set ".
" weblogin_failcount=0,weblogin_failstamp=0 ". " weblogin_failcount=0,weblogin_failstamp=0 ".
......
Supports Markdown
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