|
Lines 914-927
sub checkauth {
Link Here
|
| 914 |
-value => $session->id, |
914 |
-value => $session->id, |
| 915 |
-HttpOnly => 1 |
915 |
-HttpOnly => 1 |
| 916 |
); |
916 |
); |
| 917 |
$userid = $q_userid; |
|
|
| 918 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
917 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
| 919 |
if ( !defined($pki_field) ) { |
918 |
if ( !defined($pki_field) ) { |
| 920 |
print STDERR "ERROR: Missing system preference AllowPKIAuth.\n"; |
919 |
print STDERR "ERROR: Missing system preference AllowPKIAuth.\n"; |
| 921 |
$pki_field = 'None'; |
920 |
$pki_field = 'None'; |
| 922 |
} |
921 |
} |
| 923 |
if ( ( $cas && $query->param('ticket') ) |
922 |
if ( ( $cas && $query->param('ticket') ) |
| 924 |
|| $userid |
923 |
|| $q_userid |
| 925 |
|| ( $shib && $shib_login ) |
924 |
|| ( $shib && $shib_login ) |
| 926 |
|| $pki_field ne 'None' ) |
925 |
|| $pki_field ne 'None' ) |
| 927 |
{ |
926 |
{ |
|
Lines 935-941
sub checkauth {
Link Here
|
| 935 |
my $retuserid; |
934 |
my $retuserid; |
| 936 |
|
935 |
|
| 937 |
# Do not pass password here, else shib will not be checked in checkpw. |
936 |
# Do not pass password here, else shib will not be checked in checkpw. |
| 938 |
( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, undef, $query ); |
937 |
( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $q_userid, undef, $query ); |
| 939 |
$userid = $retuserid; |
938 |
$userid = $retuserid; |
| 940 |
$shibSuccess = $return; |
939 |
$shibSuccess = $return; |
| 941 |
$info{'invalidShibLogin'} = 1 unless ($return); |
940 |
$info{'invalidShibLogin'} = 1 unless ($return); |
|
Lines 986-992
sub checkauth {
Link Here
|
| 986 |
else { |
985 |
else { |
| 987 |
my $retuserid; |
986 |
my $retuserid; |
| 988 |
( $return, $cardnumber, $retuserid ) = |
987 |
( $return, $cardnumber, $retuserid ) = |
| 989 |
checkpw( $dbh, $userid, $password, $query, $type ); |
988 |
checkpw( $dbh, $q_userid, $password, $query, $type ); |
| 990 |
$userid = $retuserid if ($retuserid); |
989 |
$userid = $retuserid if ($retuserid); |
| 991 |
$info{'invalid_username_or_password'} = 1 unless ($return); |
990 |
$info{'invalid_username_or_password'} = 1 unless ($return); |
| 992 |
} |
991 |
} |
|
Lines 1131-1137
sub checkauth {
Link Here
|
| 1131 |
$session->param( 'ip', $session->remote_addr() ); |
1130 |
$session->param( 'ip', $session->remote_addr() ); |
| 1132 |
$session->param( 'sessiontype', 'anon' ); |
1131 |
$session->param( 'sessiontype', 'anon' ); |
| 1133 |
} |
1132 |
} |
| 1134 |
} # END if ( $userid = $query->param('userid') ) |
1133 |
} # END if ( $q_userid |
| 1135 |
elsif ( $type eq "opac" ) { |
1134 |
elsif ( $type eq "opac" ) { |
| 1136 |
|
1135 |
|
| 1137 |
# if we are here this is an anonymous session; add public lists to it and a few other items... |
1136 |
# if we are here this is an anonymous session; add public lists to it and a few other items... |
| 1138 |
- |
|
|