Lines 256-262
sub get_template_and_user {
Link Here
|
256 |
-value => '', |
256 |
-value => '', |
257 |
-HttpOnly => 1, |
257 |
-HttpOnly => 1, |
258 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
258 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
259 |
-sameSite => 'Lax', |
259 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
260 |
)); |
260 |
)); |
261 |
|
261 |
|
262 |
my $auth_error = $in->{query}->param('auth_error'); |
262 |
my $auth_error = $in->{query}->param('auth_error'); |
Lines 841-847
sub checkauth {
Link Here
|
841 |
-value => '', |
841 |
-value => '', |
842 |
-HttpOnly => 1, |
842 |
-HttpOnly => 1, |
843 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
843 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
844 |
-sameSite => 'Lax', |
844 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
845 |
)); |
845 |
)); |
846 |
$loggedin = 1; |
846 |
$loggedin = 1; |
847 |
} |
847 |
} |
Lines 914-920
sub checkauth {
Link Here
|
914 |
-value => $session->id, |
914 |
-value => $session->id, |
915 |
-HttpOnly => 1, |
915 |
-HttpOnly => 1, |
916 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
916 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
917 |
-sameSite => 'Lax', |
917 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
918 |
)); |
918 |
)); |
919 |
|
919 |
|
920 |
$flags = haspermission( $userid, $flagsrequired ); |
920 |
$flags = haspermission( $userid, $flagsrequired ); |
Lines 986-992
sub checkauth {
Link Here
|
986 |
-value => $sessionID, |
986 |
-value => $sessionID, |
987 |
-HttpOnly => 1, |
987 |
-HttpOnly => 1, |
988 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
988 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
989 |
-sameSite => 'Lax', |
989 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
990 |
)); |
990 |
)); |
991 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
991 |
my $pki_field = C4::Context->preference('AllowPKIAuth'); |
992 |
if ( !defined($pki_field) ) { |
992 |
if ( !defined($pki_field) ) { |
Lines 1194-1200
sub checkauth {
Link Here
|
1194 |
-value => '', |
1194 |
-value => '', |
1195 |
-HttpOnly => 1, |
1195 |
-HttpOnly => 1, |
1196 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1196 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1197 |
-sameSite => 'Lax', |
1197 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
1198 |
)); |
1198 |
)); |
1199 |
$info{'wrongip'} = 1; |
1199 |
$info{'wrongip'} = 1; |
1200 |
} |
1200 |
} |
Lines 1303-1309
sub checkauth {
Link Here
|
1303 |
-value => '', |
1303 |
-value => '', |
1304 |
-HttpOnly => 1, |
1304 |
-HttpOnly => 1, |
1305 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1305 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1306 |
-sameSite => 'Lax', |
1306 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ), |
1307 |
)); |
1307 |
)); |
1308 |
} |
1308 |
} |
1309 |
|
1309 |
|
Lines 1469-1475
sub checkauth {
Link Here
|
1469 |
charset => 'utf-8', |
1469 |
charset => 'utf-8', |
1470 |
cookie => $cookie, |
1470 |
cookie => $cookie, |
1471 |
'X-Frame-Options' => 'SAMEORIGIN', |
1471 |
'X-Frame-Options' => 'SAMEORIGIN', |
1472 |
-sameSite => 'Lax' |
1472 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ) |
1473 |
} |
1473 |
} |
1474 |
), |
1474 |
), |
1475 |
$template->output; |
1475 |
$template->output; |
Lines 1553-1559
sub check_api_auth {
Link Here
|
1553 |
-value => $session->id, |
1553 |
-value => $session->id, |
1554 |
-HttpOnly => 1, |
1554 |
-HttpOnly => 1, |
1555 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1555 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1556 |
-sameSite => 'Lax' |
1556 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ) |
1557 |
); |
1557 |
); |
1558 |
return ( $return, $cookie, $session ); # return == 'ok' here |
1558 |
return ( $return, $cookie, $session ); # return == 'ok' here |
1559 |
|
1559 |
|
Lines 1594-1600
sub check_api_auth {
Link Here
|
1594 |
-value => $sessionID, |
1594 |
-value => $sessionID, |
1595 |
-HttpOnly => 1, |
1595 |
-HttpOnly => 1, |
1596 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1596 |
-secure => ( C4::Context->https_enabled() ? 1 : 0 ), |
1597 |
-sameSite => 'Lax' |
1597 |
-sameSite => ( C4::Context->preference('SameSiteSessionCookie') ? 'Strict' : 'Lax' ) |
1598 |
); |
1598 |
); |
1599 |
if ( $return == 1 ) { |
1599 |
if ( $return == 1 ) { |
1600 |
my ( |
1600 |
my ( |