diff options
-rw-r--r-- | Bugzilla/Auth/Persist/Cookie.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/Auth/Persist/Cookie.pm b/Bugzilla/Auth/Persist/Cookie.pm index 2d1291f3b..877d1907e 100644 --- a/Bugzilla/Auth/Persist/Cookie.pm +++ b/Bugzilla/Auth/Persist/Cookie.pm @@ -100,6 +100,8 @@ sub logout { if ($type == LOGOUT_ALL) { $dbh->do("DELETE FROM logincookies WHERE userid = ?", undef, $user->id); + $dbh->do("DELETE FROM tokens WHERE userid = ? AND tokentype = 'sudo'", + undef, $user->id); return; } @@ -144,6 +146,8 @@ sub logout { $dbh->sql_in('cookie', \@login_cookies) . " AND userid = ?", undef, $user->id); + my $token = $cgi->cookie('sudo'); + delete_token($token); } else { die("Invalid type $type supplied to logout()"); } |