Lines 244-249
sub get_template_and_user {
Link Here
|
244 |
-value => '', |
244 |
-value => '', |
245 |
-expires => '', |
245 |
-expires => '', |
246 |
-HttpOnly => 1, |
246 |
-HttpOnly => 1, |
|
|
247 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
247 |
); |
248 |
); |
248 |
|
249 |
|
249 |
$template->param( |
250 |
$template->param( |
Lines 862-867
sub checkauth {
Link Here
|
862 |
-value => '', |
863 |
-value => '', |
863 |
-expires => '', |
864 |
-expires => '', |
864 |
-HttpOnly => 1, |
865 |
-HttpOnly => 1, |
|
|
866 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
865 |
); |
867 |
); |
866 |
$loggedin = 1; |
868 |
$loggedin = 1; |
867 |
} |
869 |
} |
Lines 993-999
sub checkauth {
Link Here
|
993 |
$cookie = $query->cookie( |
995 |
$cookie = $query->cookie( |
994 |
-name => 'CGISESSID', |
996 |
-name => 'CGISESSID', |
995 |
-value => $session->id, |
997 |
-value => $session->id, |
996 |
-HttpOnly => 1 |
998 |
-HttpOnly => 1, |
|
|
999 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
997 |
); |
1000 |
); |
998 |
$session->param( 'lasttime', time() ); |
1001 |
$session->param( 'lasttime', time() ); |
999 |
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... |
1002 |
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 1022-1028
sub checkauth {
Link Here
|
1022 |
$cookie = $query->cookie( |
1025 |
$cookie = $query->cookie( |
1023 |
-name => 'CGISESSID', |
1026 |
-name => 'CGISESSID', |
1024 |
-value => $session->id, |
1027 |
-value => $session->id, |
1025 |
-HttpOnly => 1 |
1028 |
-HttpOnly => 1, |
|
|
1029 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1026 |
); |
1030 |
); |
1027 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
1031 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
1028 |
if ( !defined($pki_field) ) { |
1032 |
if ( !defined($pki_field) ) { |
Lines 1215-1221
sub checkauth {
Link Here
|
1215 |
$cookie = $query->cookie( |
1219 |
$cookie = $query->cookie( |
1216 |
-name => 'CGISESSID', |
1220 |
-name => 'CGISESSID', |
1217 |
-value => '', |
1221 |
-value => '', |
1218 |
-HttpOnly => 1 |
1222 |
-HttpOnly => 1, |
|
|
1223 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1219 |
); |
1224 |
); |
1220 |
$info{'wrongip'} = 1; |
1225 |
$info{'wrongip'} = 1; |
1221 |
} |
1226 |
} |
Lines 1304-1310
sub checkauth {
Link Here
|
1304 |
$cookie = $query->cookie( |
1309 |
$cookie = $query->cookie( |
1305 |
-name => 'CGISESSID', |
1310 |
-name => 'CGISESSID', |
1306 |
-value => '', |
1311 |
-value => '', |
1307 |
-HttpOnly => 1 |
1312 |
-HttpOnly => 1, |
|
|
1313 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1308 |
); |
1314 |
); |
1309 |
} |
1315 |
} |
1310 |
|
1316 |
|
Lines 1720-1725
sub check_api_auth {
Link Here
|
1720 |
-name => 'CGISESSID', |
1726 |
-name => 'CGISESSID', |
1721 |
-value => $session->id, |
1727 |
-value => $session->id, |
1722 |
-HttpOnly => 1, |
1728 |
-HttpOnly => 1, |
|
|
1729 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1723 |
); |
1730 |
); |
1724 |
$session->param( 'lasttime', time() ); |
1731 |
$session->param( 'lasttime', time() ); |
1725 |
my $flags = haspermission( $userid, $flagsrequired ); |
1732 |
my $flags = haspermission( $userid, $flagsrequired ); |
Lines 1774-1779
sub check_api_auth {
Link Here
|
1774 |
-name => 'CGISESSID', |
1781 |
-name => 'CGISESSID', |
1775 |
-value => $sessionID, |
1782 |
-value => $sessionID, |
1776 |
-HttpOnly => 1, |
1783 |
-HttpOnly => 1, |
|
|
1784 |
-secure => ( $ENV{HTTPS} ? 1 : 0 ), |
1777 |
); |
1785 |
); |
1778 |
if ( $return == 1 ) { |
1786 |
if ( $return == 1 ) { |
1779 |
my ( |
1787 |
my ( |