Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
111
Issues
111
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
8d6bb88e
Commit
8d6bb88e
authored
Jan 30, 2007
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple of small bugs that have been uncovered during my sweep.
parent
0b1af898
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
www/tbauth.php3
www/tbauth.php3
+8
-5
No files found.
www/tbauth.php3
View file @
8d6bb88e
...
...
@@ -71,7 +71,7 @@ function GENHASH() {
$random_bytes
=
fread
(
$fp
,
128
);
fclose
(
$fp
);
$hash
=
mhash
(
MHASH_MD5
,
bin2hex
(
$r
etval
)
.
" "
.
microtime
());
$hash
=
mhash
(
MHASH_MD5
,
bin2hex
(
$r
andom_bytes
)
.
" "
.
microtime
());
return
bin2hex
(
$hash
);
}
...
...
@@ -183,10 +183,13 @@ function LoginStatus() {
# rather than passing it is a cookie.
if
(
isset
(
$nocookieauth
))
{
$curhash
=
$nocookieauth
;
}
else
{
}
elseif
(
array_key_exists
(
$TBAUTHCOOKIE
,
$HTTP_COOKIE_VARS
))
{
$curhash
=
$HTTP_COOKIE_VARS
[
$TBAUTHCOOKIE
];
}
$hashhash
=
$HTTP_COOKIE_VARS
[
$TBLOGINCOOKIE
];
if
(
array_key_exists
(
$TBLOGINCOOKIE
,
$HTTP_COOKIE_VARS
))
{
$hashhash
=
$HTTP_COOKIE_VARS
[
$TBLOGINCOOKIE
];
}
#
# We have to get at least one of the hashes. The Java applets do not
...
...
@@ -439,7 +442,7 @@ function LoginStatus() {
#
function
LOGGEDINORDIE
(
$uid
,
$modifier
=
0
,
$login_url
=
NULL
)
{
global
$TBBASE
,
$BASEPATH
;
global
$TBAUTHTIMEOUT
,
$CHECKLOGIN_HASHKEY
;
global
$TBAUTHTIMEOUT
,
$CHECKLOGIN_HASHKEY
,
$CHECKLOGIN_IDX
;
#
# We now ignore the $uid argument and let LoginStatus figure it out.
...
...
@@ -1093,7 +1096,7 @@ function LASTWEBLOGIN($uid) {
if
(
mysql_num_rows
(
$query_result
))
{
$lastrow
=
mysql_fetch_array
(
$query_result
);
return
$lastrow
[
weblogin_last
];
return
$lastrow
[
"weblogin_last"
];
}
return
0
;
}
...
...
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