Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Ugh...Browser...Login Problems

Quote Reply
Ugh...Browser...Login Problems
Okay I have installed a third copy of "Links SQL v.1.13" in my server with a separate login process.

In reference to the following Thread:

http://www.gossamer-threads.com/...&vc=1#Post112011

I am now experiencing the opposite problem...login does not work properly in Netscape 4.6 and above...versus working fine in IE 4.0 or above.

I really don't know what the problem is...I have been struggling with this for a week now....

I have used both of the following sub authenticate subs....(same result...login does not work in Netscape 4.6 or above)...

SUB1

Code:

sub authenticate {
# --------------------------------------------------------
# Make sure the current session is valid and gets the user info.
#
my $s = shift;
$s =~ /^[\d\w]+$/ || return undef;
(length $s < 26) || return undef;
if (!$USERDB) {
$USERDB = new AG::DBSQL $AG{def_files} . "tbl_AG_Person.def";
}
my $query = qq!
SELECT tbl_AG_Person.*
FROM tbl_AG_Person, tbl_AG_User_Sessions
WHERE tbl_AG_Person.Username = tbl_AG_User_Sessions.Username AND
tbl_AG_User_Sessions.ID = '$s'
!;
my $sth = $USERDB->prepare ($query);
$sth->execute();
my $user = undef;
if ($sth->rows) {
$user = $sth->fetchrow_hashref;
}
return $user;
}


SUB2

Code:

sub authenticate {
# --------------------------------------------------------
# Make sure the current session is valid and gets the user info.
#
my $s = shift;
$s =~ /^[\d\w]+$/ or return undef;
(length $s < 26) or return undef;

if ($AG::DBSQL::DBH) {
$AG::DBSQL::DBH->disconnect; ### needs a fresh connection
undef $AG::DBSQL::DBH;
}

$USERDB = new AG::DBSQL $AG{def_files} . "tbl_AG_Person.def";

my $query = qq!
SELECT tbl_AG_Person.*
FROM tbl_AG_Person, tbl_AG_User_Sessions
WHERE tbl_AG_Person.Username = tbl_AG_User_Sessions.Username AND tbl_AG_User_Sessions.SessionID = '$s'
!;
my $sth = $USERDB->prepare ($query);
$sth->execute();
my $user = undef;
if ($sth->rows) {
$user = $sth->fetchrow_hashref;
}
return $user;
}


Client cookies are also set properly in IE with a blank "Username" value in Netscape.

Any ideas???

Thanks in advance.

Regards,

Eliot Lee
Quote Reply
Re: Ugh...Browser...Login Problems In reply to
Okay...figured it out....

By removing the second WHERE clause in the first set of codes:

Code:

AND tbl_AG_User_Sessions.ID = '$s'


I was able to login in via both browsers...but is the best secure method?

Thanks in advance.

Regards,

Eliot Lee