Lines 229-234
sub get_template_and_user {
Link Here
|
229 |
-value => '', |
229 |
-value => '', |
230 |
-expires => '', |
230 |
-expires => '', |
231 |
-HttpOnly => 1, |
231 |
-HttpOnly => 1, |
|
|
232 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
232 |
); |
233 |
); |
233 |
|
234 |
|
234 |
$template->param( |
235 |
$template->param( |
Lines 829-834
sub checkauth {
Link Here
|
829 |
-value => '', |
830 |
-value => '', |
830 |
-expires => '', |
831 |
-expires => '', |
831 |
-HttpOnly => 1, |
832 |
-HttpOnly => 1, |
|
|
833 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
832 |
); |
834 |
); |
833 |
$loggedin = 1; |
835 |
$loggedin = 1; |
834 |
} |
836 |
} |
Lines 929-935
sub checkauth {
Link Here
|
929 |
$cookie = $query->cookie( |
931 |
$cookie = $query->cookie( |
930 |
-name => 'CGISESSID', |
932 |
-name => 'CGISESSID', |
931 |
-value => $session->id, |
933 |
-value => $session->id, |
932 |
-HttpOnly => 1 |
934 |
-HttpOnly => 1, |
|
|
935 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
933 |
); |
936 |
); |
934 |
$session->param( 'lasttime', time() ); |
937 |
$session->param( 'lasttime', time() ); |
935 |
unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... |
938 |
unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... |
Lines 958-964
sub checkauth {
Link Here
|
958 |
$cookie = $query->cookie( |
961 |
$cookie = $query->cookie( |
959 |
-name => 'CGISESSID', |
962 |
-name => 'CGISESSID', |
960 |
-value => $session->id, |
963 |
-value => $session->id, |
961 |
-HttpOnly => 1 |
964 |
-HttpOnly => 1, |
|
|
965 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
962 |
); |
966 |
); |
963 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
967 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
964 |
if ( !defined($pki_field) ) { |
968 |
if ( !defined($pki_field) ) { |
Lines 1124-1130
sub checkauth {
Link Here
|
1124 |
$cookie = $query->cookie( |
1128 |
$cookie = $query->cookie( |
1125 |
-name => 'CGISESSID', |
1129 |
-name => 'CGISESSID', |
1126 |
-value => '', |
1130 |
-value => '', |
1127 |
-HttpOnly => 1 |
1131 |
-HttpOnly => 1, |
|
|
1132 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1128 |
); |
1133 |
); |
1129 |
$info{'wrongip'} = 1; |
1134 |
$info{'wrongip'} = 1; |
1130 |
} |
1135 |
} |
Lines 1202-1208
sub checkauth {
Link Here
|
1202 |
$cookie = $query->cookie( |
1207 |
$cookie = $query->cookie( |
1203 |
-name => 'CGISESSID', |
1208 |
-name => 'CGISESSID', |
1204 |
-value => '', |
1209 |
-value => '', |
1205 |
-HttpOnly => 1 |
1210 |
-HttpOnly => 1, |
|
|
1211 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1206 |
); |
1212 |
); |
1207 |
} |
1213 |
} |
1208 |
|
1214 |
|
Lines 1469-1474
sub check_api_auth {
Link Here
|
1469 |
-name => 'CGISESSID', |
1475 |
-name => 'CGISESSID', |
1470 |
-value => $session->id, |
1476 |
-value => $session->id, |
1471 |
-HttpOnly => 1, |
1477 |
-HttpOnly => 1, |
|
|
1478 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1472 |
); |
1479 |
); |
1473 |
$session->param( 'lasttime', time() ); |
1480 |
$session->param( 'lasttime', time() ); |
1474 |
my $flags = haspermission( $userid, $flagsrequired ); |
1481 |
my $flags = haspermission( $userid, $flagsrequired ); |
Lines 1523-1528
sub check_api_auth {
Link Here
|
1523 |
-name => 'CGISESSID', |
1530 |
-name => 'CGISESSID', |
1524 |
-value => $sessionID, |
1531 |
-value => $sessionID, |
1525 |
-HttpOnly => 1, |
1532 |
-HttpOnly => 1, |
|
|
1533 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1526 |
); |
1534 |
); |
1527 |
if ( $return == 1 ) { |
1535 |
if ( $return == 1 ) { |
1528 |
my ( |
1536 |
my ( |