From 9927214d8df87e1c4cdf1fafae258c1a6635221a Mon Sep 17 00:00:00 2001 From: finlayt Date: Wed, 27 Nov 2002 00:03:07 +0000 Subject: [PATCH] Fixed a bug in the Auth.pm --- C4/Auth.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index b2495b1452..c8f0a5bdae 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -170,7 +170,7 @@ sub checkauth { } } } - unless ($sessionID) { + unless ($userid) { $sessionID=int(rand()*100000).'-'.time(); $userid=$query->param('userid'); my $password=$query->param('password'); @@ -194,7 +194,7 @@ sub checkauth { } } else { if ($userid) { - $info{'invalid_username_or_password'}; + $info{'invalid_username_or_password'} = 1; } } } @@ -211,22 +211,21 @@ sub checkauth { } # else we have a problem... # get the inputs from the incoming query - my @inputs; + my @inputs =(); foreach my $name (param $query) { (next) if ($name eq 'userid' || $name eq 'password'); my $value = $query->param($name); push @inputs, {name => $name , value => $value}; } - @inputs = () unless @inputs; my $template = gettemplate("opac-auth.tmpl", "opac"); $template->param(INPUTS => \@inputs); $template->param(loginprompt => 1) unless $info{'nopermission'}; - my $self_url = $query->self_url(); + my $self_url = $query->url(-absolute => 1); # Strip userid and password parameters off the self_url variable - $self_url=~s/\?*userid=[^;]*;*//g; - $self_url=~s/\?*password=[^;]*;*//g; +# $self_url=~s/\?*userid=[^;]*;*//g; +# $self_url=~s/\?*password=[^;]*;*//g; $template->param(url => $self_url); $template->param(\%info); -- 2.39.5