Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
60900705
Commit
60900705
authored
Mar 01, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 121601: Have logout display index.cgi, not just a message on relogin.cgi.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
parent
b4ab9588
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
21 deletions
+18
-21
Cookie.pm
Bugzilla/Auth/Persist/Cookie.pm
+1
-0
index.cgi
index.cgi
+13
-4
relogin.cgi
relogin.cgi
+1
-15
common-links.html.tmpl
template/en/default/global/common-links.html.tmpl
+1
-1
sidebar.xul.tmpl
template/en/default/sidebar.xul.tmpl
+2
-1
No files found.
Bugzilla/Auth/Persist/Cookie.pm
View file @
60900705
...
...
@@ -161,6 +161,7 @@ sub clear_browser_cookies {
my
$cgi
=
Bugzilla
->
cgi
;
$cgi
->
remove_cookie
(
'Bugzilla_login'
);
$cgi
->
remove_cookie
(
'Bugzilla_logincookie'
);
$cgi
->
remove_cookie
(
'sudo'
);
}
1
;
index.cgi
View file @
60900705
...
...
@@ -38,12 +38,24 @@ use Bugzilla::Update;
# Check whether or not the user is logged in
my
$user
=
Bugzilla
->
login
(
LOGIN_OPTIONAL
);
my
$cgi
=
Bugzilla
->
cgi
;
my
$template
=
Bugzilla
->
template
;
my
$vars
=
{};
# And log out the user if requested. We do this first so that nothing
# else accidentally relies on the current login.
if
(
$cgi
->
param
(
'logout'
))
{
Bugzilla
->
logout
();
$user
=
Bugzilla
->
user
;
$vars
->
{
'message'
}
=
"logged_out"
;
# Make sure that templates or other code doesn't get confused about this.
$cgi
->
delete
(
'logout'
);
}
###############################################################################
# Main Body Execution
###############################################################################
my
$cgi
=
Bugzilla
->
cgi
;
# Force to use HTTPS unless Bugzilla->params->{'ssl'} equals 'never'.
# This is required because the user may want to log in from here.
if
(
$cgi
->
protocol
ne
'https'
&&
Bugzilla
->
params
->
{
'sslbase'
}
ne
''
...
...
@@ -52,9 +64,6 @@ if ($cgi->protocol ne 'https' && Bugzilla->params->{'sslbase'} ne ''
$cgi
->
require_https
(
Bugzilla
->
params
->
{
'sslbase'
});
}
my
$template
=
Bugzilla
->
template
;
my
$vars
=
{};
# Return the appropriate HTTP response headers.
print
$cgi
->
header
();
...
...
relogin.cgi
View file @
60900705
...
...
@@ -37,7 +37,7 @@ use Date::Format;
my
$template
=
Bugzilla
->
template
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$action
=
$cgi
->
param
(
'action'
)
||
'logout'
;
my
$action
=
$cgi
->
param
(
'action'
);
my
$vars
=
{};
my
$target
;
...
...
@@ -184,20 +184,6 @@ elsif ($action eq 'end-sudo') {
$vars
->
{
'message'
}
=
'sudo_ended'
;
$target
=
'global/message.html.tmpl'
;
}
# Log out the currently logged-in user (this used to be the only thing this did)
elsif
(
$action
eq
'logout'
)
{
# We don't want to remove a random logincookie from the db, so
# call Bugzilla->login(). If we're logged in after this, then
# the logincookie must be correct
Bugzilla
->
login
(
LOGIN_OPTIONAL
);
$cgi
->
remove_cookie
(
'sudo'
);
Bugzilla
->
logout
();
$vars
->
{
'message'
}
=
"logged_out"
;
$target
=
'global/message.html.tmpl'
;
}
# No valid action found
else
{
Bugzilla
->
login
(
LOGIN_OPTIONAL
);
...
...
template/en/default/global/common-links.html.tmpl
View file @
60900705
...
...
@@ -68,7 +68,7 @@
<li>
<span class="separator">| </span>
[% IF user.authorizer.can_logout %]
<a href="
relogin.cgi
">Log out</a>
<a href="
index.cgi?logout=1
">Log out</a>
[% ELSE %]
Logged in as
[% END %]
...
...
template/en/default/sidebar.xul.tmpl
View file @
60900705
...
...
@@ -97,7 +97,8 @@ function normal_keypress_handler( aEvent ) {
<text
class=
"text-link"
onclick=
"load_relative_url('sanitycheck.cgi')"
value=
"sanity check"
/>
[%- END %]
[%- IF user.authorizer.can_logout %]
<text
class=
"text-link"
onclick=
"load_relative_url('relogin.cgi')"
value=
"log out [% user.login FILTER html %]"
/>
<text
class=
"text-link"
onclick=
"load_relative_url('index.cgi?logout=1')"
value=
"log out [% user.login FILTER html %]"
/>
[%- END %]
<separator
class=
"thin"
/>
[%- IF user.showmybugslink %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment