Fix for bug 226764: Move InvalidateLogins into Bugzilla::Auth::CGI.

Consolidates the logout code into Bugzilla::Auth::CGI, and provides
simple front-end wrappers in Bugzilla.pm for use in the CGIs we have.
r=bbaetz, joel; a=justdave.

Adds a set of constants to the logout() API which allow specifying "how
much" we should log out -- all sessions, the current session, or all
sessions but the current one.

Fixes callsites to use this new API; cleans and documents things a
bit while we're at it. Part I in the great COOKIE apocalypse.


git-svn-id: svn://10.0.0.236/trunk@154327 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kiko%async.com.br
2004-03-27 01:28:29 +00:00
parent 2bbf8d6a5b
commit 36171a62bf
6 changed files with 135 additions and 78 deletions

View File

@@ -26,6 +26,7 @@ use strict;
use lib qw(.);
use Bugzilla;
use Bugzilla::Constants;
require "CGI.pl";
@@ -108,8 +109,9 @@ sub SaveAccount {
SendSQL("UPDATE profiles
SET cryptpassword = $cryptedpassword
WHERE userid = $userid");
# Invalidate all logins except for the current one
InvalidateLogins($userid, $cgi->cookie("Bugzilla_logincookie"));
Bugzilla->logout(LOGOUT_KEEP_CURRENT);
}
}