-value => '',
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
$template->param(
-value => '',
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
$loggedin = 1;
}
-value => $session->id,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
$flags = haspermission( $userid, $flagsrequired );
-value => $sessionID,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
my $pki_field = C4::Context->preference('AllowPKIAuth');
if ( !defined($pki_field) ) {
-value => '',
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
$info{'wrongip'} = 1;
}
-value => '',
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax',
));
}
{ type => 'text/html',
charset => 'utf-8',
cookie => $cookie,
- 'X-Frame-Options' => 'SAMEORIGIN'
+ 'X-Frame-Options' => 'SAMEORIGIN',
+ -sameSite => 'Lax'
}
),
$template->output;
-value => $session->id,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
return ( $return, $cookie, $session ); # return == 'ok' here
-value => $sessionID,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
if ( $return == 1 ) {
my (
-value => $session->id,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
$loggedin = 1;
$userid = $session->param('cardnumber');
-value => $sessionID,
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
if ( $return == 2 ) {
-HttpOnly => 1,
-expires => '',
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
}
if ($envcookie) {
-HttpOnly => 1,
-expires => '',
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
print $query->header(
-type => 'text/html; charset=utf-8',
-value => $language,
-HttpOnly => 1,
-expires => '+3y',
+ -sameSite => 'Lax',
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
);
# We encode_base64url the whole freezed structure so we're sure we won't have any encoding problems
-value => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
-HttpOnly => 1,
- -expires => ''
+ -expires => '',
+ -sameSite => 'Lax'
);
$cookie = [ $cookie, $last_created_item_cookie ];
}
window.location.href = "/cgi-bin/koha/authorities/merge.pl?authid=" + authid + "&authid=" + alreadySelected.authid + refstring;
} else {
- Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/' });
+ Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/', sameSite: 'Lax' });
showMergingInProgress();
}
}
$( '#switch-editor' ).click( function() {
if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
- Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/' } );
+ Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: 'Lax'} );
if ( state.backend == 'catalog' ) {
window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
}));
$("#select_display").on("change",function(){
var checked = $(this).prop("checked") ? 1: 0;
- Cookies.set("marctagstructure_selectdisplay", checked);
+ Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
this.form.submit();
});
});
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
- Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } );
+ Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } );
var biblionumber = [% biblionumber || "null" | html %];
function toggleMARCdocLinks(flag){
if( flag === true ){
$(".marcdocs").show();
- Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365 });
+ Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax' });
$("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
} else {
$(".marcdocs").hide();
- Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 });
+ Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax' });
$("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
}
}
if( flag === true ){
$(".tagnum").show();
$(".subfieldcode").show();
- Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365 });
+ Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax' });
$("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
} else {
$(".tagnum").hide();
$(".subfieldcode").hide();
- Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365 });
+ Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax' });
$("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
}
}
});
$("#useadvanced").click(function(){
- Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/' } );
+ Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
return true;
});
function SearchToHold(club_id) {
var date = new Date();
date.setTime(date.getTime() + (10 * 60 * 1000));
- Cookies.set("holdforclub", club_id, { path: "/", expires: date });
+ Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: 'Lax' });
location.href="/cgi-bin/koha/catalogue/search.pl";
}
</script>
var cookieData = "";
date.setTime(date.getTime() + (10 * 60 * 1000));
cookieData += basketno + "/" + vendorid;
- Cookies.set("searchToOrder", cookieData, { path: "/", expires: date });
+ Cookies.set("searchToOrder", cookieData, { path: "/", expires: date, sameSite: 'Lax' });
}
$(document).ready(function() {
$('#issues-table-load-immediately').prop('checked', true);
}
$('#issues-table-load-immediately').on( "change", function(){
- Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 });
+ Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax' });
});
function RefreshIssuesTable() {
function searchToHold(){
var date = new Date();
date.setTime(date.getTime() + (10 * 60 * 1000));
- Cookies.set("holdfor", borrowernumber, { path: "/", expires: date });
+ Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: 'Lax' });
location.href="/cgi-bin/koha/catalogue/search.pl";
}
if (!found) {
valCookie.push(hide);
var cookieString = valCookie.join("/");
- Cookies.set("showColumns", cookieString, { expires: date, path: '/' });
+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax' });
}
} else {
- Cookies.set("showColumns", hide, { expires: date, path: '/' });
+ Cookies.set("showColumns", hide, { expires: date, path: '/', sameSite: 'Lax' });
}
}
}
if (found) {
var cookieString = valCookie.join("/");
- Cookies.set("showColumns", cookieString, { expires: date, path: '/' });
+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax' });
}
}
}
$("#itemst td:nth-child("+nb_cols+"),#itemst tr th:nth-child("+nb_cols+")").nextAll().hide();
$("#hideall").prop("checked", true).parent().addClass("selected");
var cookieString = allColumns.join("/");
- Cookies.set("showColumns", cookieString, { expires: date, path: '/' });
+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax' });
}
$(document).ready(function () {
-expires => $jwt ? '+1d' : '',
-HttpOnly => 1,
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
+ -sameSite => 'Lax'
);
$template->param(patronid => $patronid);