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
09763eb1
Commit
09763eb1
authored
Jan 17, 2004
by
kiko%async.com.br
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 90468: Bugzilla does not log out automatically when closing
the session. Patch by toms@myrealbox.com (Toms Baugis), with minor cleanups by me. r=kiko, a=myk.
parent
3aeef053
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
7 deletions
+55
-7
CGI.pm
Bugzilla/Auth/CGI.pm
+22
-7
defparams.pl
defparams.pl
+18
-0
login.html.tmpl
template/en/default/account/auth/login.html.tmpl
+15
-0
No files found.
Bugzilla/Auth/CGI.pm
View file @
09763eb1
...
...
@@ -72,17 +72,32 @@ sub login {
$userid
,
$ipaddr
);
my
$logincookie
=
$dbh
->
selectrow_array
(
"SELECT LAST_INSERT_ID()"
);
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_login'
,
-
value
=>
$userid
,
-
expires
=>
'Fri, 01-Jan-2038 00:00:00 GMT'
);
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_logincookie'
,
-
value
=>
$logincookie
,
-
expires
=>
'Fri, 01-Jan-2038 00:00:00 GMT'
);
# Remember cookie only if admin has told so
# or admin didn't forbid it and user told to remember.
if
((
Param
(
'rememberlogin'
)
eq
'on'
)
||
((
Param
(
'rememberlogin'
)
ne
'off'
)
&&
(
$cgi
->
param
(
'Bugzilla_remember'
)
eq
'on'
)))
{
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_login'
,
-
value
=>
$userid
,
-
expires
=>
'Fri, 01-Jan-2038 00:00:00 GMT'
);
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_logincookie'
,
-
value
=>
$logincookie
,
-
expires
=>
'Fri, 01-Jan-2038 00:00:00 GMT'
);
}
else
{
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_login'
,
-
value
=>
$userid
);
$cgi
->
send_cookie
(
-
name
=>
'Bugzilla_logincookie'
,
-
value
=>
$logincookie
);
}
# compat code. The cookie value is used for logouts, and that
# isn't generic yet.
$::COOKIE
{
'Bugzilla_logincookie'
}
=
$logincookie
;
}
elsif
(
$authres
==
AUTH_NODATA
)
{
}
elsif
(
$authres
==
AUTH_NODATA
)
{
# No data from the form, so try to login via cookies
$username
=
$cgi
->
cookie
(
"Bugzilla_login"
);
$passwd
=
$cgi
->
cookie
(
"Bugzilla_logincookie"
);
...
...
defparams.pl
View file @
09763eb1
...
...
@@ -456,6 +456,24 @@ sub find_languages {
},
{
name
=>
'rememberlogin'
,
desc
=>
'Controls management of session cookies
<ul>
<li>on - Session cookies never expire (the user has to login only
once per browser).</li>
<li>off - Session cookies last until the users session ends (the user
will have to login in each new browser session).</li>
<li>defaulton/defaultoff - Default behavior as described
above, but user can choose whether bugzilla will remember his
login or not.</li>
</ul>'
,
type
=>
's'
,
choices
=>
[
'on'
,
'defaulton'
,
'defaultoff'
,
'off'
],
default
=>
'on'
,
checker
=>
\&
check_multi
},
{
name
=>
'mostfreqthreshold'
,
desc
=>
'The minimum number of duplicates a bug needs to show up on the '
.
'<a href="duplicates.cgi">most frequently reported bugs page</a>. '
.
...
...
template/en/default/account/auth/login.html.tmpl
View file @
09763eb1
...
...
@@ -17,6 +17,7 @@
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
# Toms Baugis <toms@myrealbox.com>
#%]
[%# INTERFACE:
...
...
@@ -53,6 +54,20 @@
<td>
<input type="password" size="35" name="Bugzilla_password">
</td>
</tr>
[% IF Param('rememberlogin') == 'defaulton' ||
Param('rememberlogin') == 'defaultoff' %]
<tr>
<td> </td>
<td>
<input type="checkbox" name="Bugzilla_remember" value="on"
[% "checked" IF Param('rememberlogin') == "defaulton" %]>
Remember my Login
</td>
</tr>
[% END %]
[% IF Param('loginnetmask') < 32 %]
<tr>
<td align="right">
...
...
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