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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
2b22c65a
Commit
2b22c65a
authored
Mar 16, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 129466 - use IP addr (not hostname) in logincookies table
r=gerv, justdave
parent
9ff5677e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
CGI.pl
CGI.pl
+3
-9
checksetup.pl
checksetup.pl
+12
-2
No files found.
CGI.pl
View file @
2b22c65a
...
...
@@ -695,15 +695,12 @@ sub quietly_check_login() {
if
(
defined
$::COOKIE
{
"Bugzilla_login"
}
&&
defined
$::COOKIE
{
"Bugzilla_logincookie"
})
{
ConnectToDatabase
();
if
(
!
defined
$ENV
{
'REMOTE_HOST'
})
{
$ENV
{
'REMOTE_HOST'
}
=
$ENV
{
'REMOTE_ADDR'
};
}
SendSQL
(
"SELECT profiles.userid, profiles.groupset, "
.
"profiles.login_name, "
.
"profiles.login_name = "
.
SqlQuote
(
$::COOKIE
{
"Bugzilla_login"
})
.
" AND logincookies.
hostname
= "
.
SqlQuote
(
$ENV
{
"REMOTE_
HOST
"
})
.
" AND logincookies.
ipaddr
= "
.
SqlQuote
(
$ENV
{
"REMOTE_
ADDR
"
})
.
", profiles.disabledtext "
.
" FROM profiles, logincookies WHERE logincookies.cookie = "
.
SqlQuote
(
$::COOKIE
{
"Bugzilla_logincookie"
})
.
...
...
@@ -988,10 +985,7 @@ sub confirm_login {
# the cookies.
if
(
$enteredlogin
ne
""
)
{
$::COOKIE
{
"Bugzilla_login"
}
=
$enteredlogin
;
if
(
!
defined
$ENV
{
'REMOTE_HOST'
})
{
$ENV
{
'REMOTE_HOST'
}
=
$ENV
{
'REMOTE_ADDR'
};
}
SendSQL
(
"insert into logincookies (userid,hostname) values (@{[DBNameToIdAndCheck($enteredlogin)]}, @{[SqlQuote($ENV{'REMOTE_HOST'})]})"
);
SendSQL
(
"insert into logincookies (userid,ipaddr) values (@{[DBNameToIdAndCheck($enteredlogin)]}, @{[SqlQuote($ENV{'REMOTE_ADDR'})]})"
);
SendSQL
(
"select LAST_INSERT_ID()"
);
my
$logincookie
=
FetchOneColumn
();
...
...
checksetup.pl
View file @
2b22c65a
...
...
@@ -1155,11 +1155,10 @@ $table{groups} =
unique(bit),
unique(name)'
;
$table
{
logincookies
}
=
'cookie mediumint not null auto_increment primary key,
userid mediumint not null,
hostname varchar(128)
,
ipaddr varchar(40) NOT NULL
,
lastused timestamp,
index(lastused)'
;
...
...
@@ -2706,6 +2705,17 @@ if (GetFieldDef("bugs","qacontact_accessible")) {
DropField
(
"bugs"
,
"assignee_accessible"
);
}
# 2002-03-15 bbaetz@student.usyd.edu.au - bug 129466
# Use the ip, not the hostname, in the logincookies table
if
(
GetFieldDef
(
"logincookies"
,
"hostname"
))
{
# We've changed what we match against, so all entries are now invalid
$dbh
->
do
(
"DELETE FROM logincookies"
);
# Now update the logincookies schema
DropField
(
"logincookies"
,
"hostname"
);
AddField
(
"logincookies"
,
"ipaddr"
,
"varchar(40) NOT NULL"
);
}
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
#
...
...
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