View | Details | Raw Unified | Return to bug 33259
Collapse All | Expand All

(-)a/C4/Auth.pm (-9 / +9 lines)
Lines 257-263 sub get_template_and_user { Link Here
257
                -value    => '',
257
                -value    => '',
258
                -HttpOnly => 1,
258
                -HttpOnly => 1,
259
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
259
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
260
                -sameSite => 'Lax',
260
                -sameSite => C4::Context->preference('SameSiteSessionCookie'),
261
            ));
261
            ));
262
262
263
            #NOTE: This JWT should only be used by the self-check controllers
263
            #NOTE: This JWT should only be used by the self-check controllers
Lines 852-858 sub checkauth { Link Here
852
            -value    => '',
852
            -value    => '',
853
            -HttpOnly => 1,
853
            -HttpOnly => 1,
854
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
854
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
855
            -sameSite => 'Lax',
855
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
856
        ));
856
        ));
857
        $loggedin = 1;
857
        $loggedin = 1;
858
    }
858
    }
Lines 926-932 sub checkauth { Link Here
926
                    -value    => $session->id,
926
                    -value    => $session->id,
927
                    -HttpOnly => 1,
927
                    -HttpOnly => 1,
928
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
928
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
929
                    -sameSite => 'Lax',
929
                    -sameSite => C4::Context->preference('SameSiteSessionCookie'),
930
                ));
930
                ));
931
931
932
                $flags = haspermission( $userid, $flagsrequired );
932
                $flags = haspermission( $userid, $flagsrequired );
Lines 998-1004 sub checkauth { Link Here
998
            -value    => $sessionID,
998
            -value    => $sessionID,
999
            -HttpOnly => 1,
999
            -HttpOnly => 1,
1000
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1000
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1001
            -sameSite => 'Lax',
1001
            -sameSite =>  C4::Context->preference('SameSiteSessionCookie'),
1002
        ));
1002
        ));
1003
        my $pki_field = C4::Context->preference('AllowPKIAuth');
1003
        my $pki_field = C4::Context->preference('AllowPKIAuth');
1004
        if ( !defined($pki_field) ) {
1004
        if ( !defined($pki_field) ) {
Lines 1206-1212 sub checkauth { Link Here
1206
                                -value    => '',
1206
                                -value    => '',
1207
                                -HttpOnly => 1,
1207
                                -HttpOnly => 1,
1208
                                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1208
                                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1209
                                -sameSite => 'Lax',
1209
                                -sameSite => C4::Context->preference('SameSiteSessionCookie'),
1210
                            ));
1210
                            ));
1211
                            $info{'wrongip'} = 1;
1211
                            $info{'wrongip'} = 1;
1212
                        }
1212
                        }
Lines 1315-1321 sub checkauth { Link Here
1315
                -value    => '',
1315
                -value    => '',
1316
                -HttpOnly => 1,
1316
                -HttpOnly => 1,
1317
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1317
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1318
                -sameSite => 'Lax',
1318
                -sameSite => C4::Context->preference('SameSiteSessionCookie'),
1319
            ));
1319
            ));
1320
        }
1320
        }
1321
1321
Lines 1486-1492 sub checkauth { Link Here
1486
            charset           => 'utf-8',
1486
            charset           => 'utf-8',
1487
            cookie            => $cookie,
1487
            cookie            => $cookie,
1488
            'X-Frame-Options' => 'SAMEORIGIN',
1488
            'X-Frame-Options' => 'SAMEORIGIN',
1489
            -sameSite => 'Lax'
1489
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
1490
        }
1490
        }
1491
      ),
1491
      ),
1492
      $template->output;
1492
      $template->output;
Lines 1570-1576 sub check_api_auth { Link Here
1570
            -value    => $session->id,
1570
            -value    => $session->id,
1571
            -HttpOnly => 1,
1571
            -HttpOnly => 1,
1572
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1572
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1573
            -sameSite => 'Lax'
1573
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
1574
        );
1574
        );
1575
        return ( $return, $cookie, $session ); # return == 'ok' here
1575
        return ( $return, $cookie, $session ); # return == 'ok' here
1576
1576
Lines 1611-1617 sub check_api_auth { Link Here
1611
                -value    => $sessionID,
1611
                -value    => $sessionID,
1612
                -HttpOnly => 1,
1612
                -HttpOnly => 1,
1613
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1613
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1614
                -sameSite => 'Lax'
1614
                -sameSite => C4::Context->preference('SameSiteSessionCookie')
1615
            );
1615
            );
1616
            if ( $return == 1 ) {
1616
            if ( $return == 1 ) {
1617
                my (
1617
                my (
(-)a/C4/InstallAuth.pm (-4 / +4 lines)
Lines 262-268 sub checkauth { Link Here
262
                -value    => $session->id,
262
                -value    => $session->id,
263
                -HttpOnly => 1,
263
                -HttpOnly => 1,
264
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
264
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
265
                -sameSite => 'Lax'
265
                -sameSite => C4::Context->preference('SameSiteSessionCookie')
266
            );
266
            );
267
            $loggedin = 1;
267
            $loggedin = 1;
268
            $userid   = $session->param('cardnumber');
268
            $userid   = $session->param('cardnumber');
Lines 303-309 sub checkauth { Link Here
303
                -value    => $sessionID,
303
                -value    => $sessionID,
304
                -HttpOnly => 1,
304
                -HttpOnly => 1,
305
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
305
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
306
                -sameSite => 'Lax'
306
                -sameSite => C4::Context->preference('SameSiteSessionCookie')
307
            );
307
            );
308
            if ( $return == 2 ) {
308
            if ( $return == 2 ) {
309
309
Lines 351-357 sub checkauth { Link Here
351
                -HttpOnly => 1,
351
                -HttpOnly => 1,
352
                -expires => '',
352
                -expires => '',
353
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
353
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
354
                -sameSite => 'Lax'
354
                -sameSite => C4::Context->preference('SameSiteSessionCookie')
355
            );
355
            );
356
        }
356
        }
357
        if ($envcookie) {
357
        if ($envcookie) {
Lines 395-401 sub checkauth { Link Here
395
        -HttpOnly => 1,
395
        -HttpOnly => 1,
396
        -expires => '',
396
        -expires => '',
397
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
397
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
398
        -sameSite => 'Lax'
398
        -sameSite => C4::Context->preference('SameSiteSessionCookie')
399
    );
399
    );
400
    print $query->header(
400
    print $query->header(
401
        -type    => 'text/html; charset=utf-8',
401
        -type    => 'text/html; charset=utf-8',
(-)a/C4/Templates.pm (-1 / +1 lines)
Lines 354-360 sub getlanguagecookie { Link Here
354
        -value   => $language,
354
        -value   => $language,
355
        -HttpOnly => 1,
355
        -HttpOnly => 1,
356
        -expires => '+3y',
356
        -expires => '+3y',
357
        -sameSite => 'Lax',
357
        -sameSite => C4::Context->preference('SameSiteSessionCookie'),
358
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
358
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
359
    );
359
    );
360
360
(-)a/cataloguing/additem.pl (-2 / +2 lines)
Lines 220-226 if ($load_template_submit || $unload_template_submit) { Link Here
220
        -value    => $cookie_value,
220
        -value    => $cookie_value,
221
        -HttpOnly => 1,
221
        -HttpOnly => 1,
222
        -expires  => '',
222
        -expires  => '',
223
        -sameSite => 'Lax'
223
        -sameSite => C4::Context->preference('SameSiteSessionCookie')
224
    );
224
    );
225
225
226
    $cookie = [ $cookie, $template_cookie ];
226
    $cookie = [ $cookie, $template_cookie ];
Lines 348-354 if ($op eq "additem") { Link Here
348
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
348
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
349
                    -HttpOnly => 1,
349
                    -HttpOnly => 1,
350
                    -expires => '',
350
                    -expires => '',
351
                    -sameSite => 'Lax'
351
                    -sameSite => C4::Context->preference('SameSiteSessionCookie')
352
                );
352
                );
353
353
354
                $cookie = [ $cookie, $last_created_item_cookie ];
354
                $cookie = [ $cookie, $last_created_item_cookie ];
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc (-1 / +1 lines)
Lines 12-18 function mergeAuth(authid, summary) { Link Here
12
        }
12
        }
13
        window.location.href = "/cgi-bin/koha/authorities/merge.pl?authid=" + authid + "&authid=" + alreadySelected.authid + refstring;
13
        window.location.href = "/cgi-bin/koha/authorities/merge.pl?authid=" + authid + "&authid=" + alreadySelected.authid + refstring;
14
    } else {
14
    } else {
15
        Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/', sameSite: 'Lax' });
15
        Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
16
        showMergingInProgress();
16
        showMergingInProgress();
17
    }
17
    }
18
}
18
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-1 / +1 lines)
Lines 979-985 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
979
    function changeEditor() {
979
    function changeEditor() {
980
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
980
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
981
981
982
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: 'Lax'} );
982
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
983
983
984
            if ( state.backend == 'catalog' ) {
984
            if ( state.backend == 'catalog' ) {
985
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
985
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-1 / +1 lines)
Lines 338-344 Link Here
338
            }));
338
            }));
339
            $("#select_display").on("change",function(){
339
            $("#select_display").on("change",function(){
340
                var checked = $(this).prop("checked") ? 1: 0;
340
                var checked = $(this).prop("checked") ? 1: 0;
341
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
341
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
342
                this.form.submit();
342
                this.form.submit();
343
            });
343
            });
344
        });
344
        });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-5 / +6 lines)
Lines 43-49 Link Here
43
43
44
        if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
44
        if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
45
45
46
        Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax'  } );
46
        Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
47
47
48
        var biblionumber = [% biblionumber || "null" | html %];
48
        var biblionumber = [% biblionumber || "null" | html %];
49
49
Lines 543-553 $(document).ready(function(){ Link Here
543
    function toggleMARCdocLinks(flag){
543
    function toggleMARCdocLinks(flag){
544
        if( flag === true ){
544
        if( flag === true ){
545
            $(".marcdocs").show();
545
            $(".marcdocs").show();
546
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
546
547
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
547
            $("#marcDocsSelect i").addClass('fa-check-square').removeClass('fa-square');
548
            $("#marcDocsSelect i").addClass('fa-check-square').removeClass('fa-square');
548
        } else {
549
        } else {
549
            $(".marcdocs").hide();
550
            $(".marcdocs").hide();
550
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
551
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
551
            $("#marcDocsSelect i").removeClass('fa-check-square').addClass('fa-square');
552
            $("#marcDocsSelect i").removeClass('fa-check-square').addClass('fa-square');
552
        }
553
        }
553
    }
554
    }
Lines 556-567 $(document).ready(function(){ Link Here
556
        if( flag === true ){
557
        if( flag === true ){
557
            $(".tagnum").show();
558
            $(".tagnum").show();
558
            $(".subfieldcode").show();
559
            $(".subfieldcode").show();
559
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
560
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
560
            $("#marcTagsSelect i").addClass('fa-check-square').removeClass('fa-square');
561
            $("#marcTagsSelect i").addClass('fa-check-square').removeClass('fa-square');
561
        } else {
562
        } else {
562
            $(".tagnum").hide();
563
            $(".tagnum").hide();
563
            $(".subfieldcode").hide();
564
            $(".subfieldcode").hide();
564
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
565
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
565
            $("#marcTagsSelect i").removeClass('fa-check-square').addClass('fa-square');
566
            $("#marcTagsSelect i").removeClass('fa-check-square').addClass('fa-square');
566
        }
567
        }
567
    }
568
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +1 lines)
Lines 304-310 Link Here
304
            });
304
            });
305
305
306
            $("#useadvanced").click(function(){
306
            $("#useadvanced").click(function(){
307
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
307
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
308
                return true;
308
                return true;
309
            });
309
            });
310
310
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt (-1 / +1 lines)
Lines 249-255 Link Here
249
        });
249
        });
250
250
251
        $("#useadvanced").click(function(){
251
        $("#useadvanced").click(function(){
252
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
252
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
253
            return true;
253
            return true;
254
        });
254
        });
255
    });
255
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt (-1 / +1 lines)
Lines 240-246 Link Here
240
        function SearchToHold(club_id) {
240
        function SearchToHold(club_id) {
241
            var date = new Date();
241
            var date = new Date();
242
            date.setTime(date.getTime() + (10 * 60 * 1000));
242
            date.setTime(date.getTime() + (10 * 60 * 1000));
243
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: 'Lax'  });
243
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
244
            location.href="/cgi-bin/koha/catalogue/search.pl";
244
            location.href="/cgi-bin/koha/catalogue/search.pl";
245
        }
245
        }
246
    </script>
246
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js (-1 / +1 lines)
Lines 3-9 function searchToOrder( basketno, vendorid ){ Link Here
3
    var cookieData = "";
3
    var cookieData = "";
4
    date.setTime(date.getTime() + (10 * 60 * 1000));
4
    date.setTime(date.getTime() + (10 * 60 * 1000));
5
    cookieData += basketno + "/" + vendorid;
5
    cookieData += basketno + "/" + vendorid;
6
    Cookies.set("searchToOrder", cookieData, { path: "/", expires: date, sameSite: 'Lax'  });
6
    Cookies.set("searchToOrder", cookieData, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
7
}
7
}
8
8
9
$(document).ready(function() {
9
$(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 / +1 lines)
Lines 289-295 $(document).ready(function() { Link Here
289
        $('#issues-table-load-delay').hide();
289
        $('#issues-table-load-delay').hide();
290
    }
290
    }
291
    $('#issues-table-load-immediately').on( "change", function(){
291
    $('#issues-table-load-immediately').on( "change", function(){
292
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax'  });
292
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
293
    });
293
    });
294
294
295
    function RefreshIssuesTable() {
295
    function RefreshIssuesTable() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-1 / +1 lines)
Lines 146-151 function export_barcodes() { Link Here
146
function searchToHold(){
146
function searchToHold(){
147
    var date = new Date();
147
    var date = new Date();
148
    date.setTime(date.getTime() + (10 * 60 * 1000));
148
    date.setTime(date.getTime() + (10 * 60 * 1000));
149
    Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: 'Lax'  });
149
    Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
150
    location.href="/cgi-bin/koha/catalogue/search.pl";
150
    location.href="/cgi-bin/koha/catalogue/search.pl";
151
}
151
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js (-4 / +4 lines)
Lines 52-61 function hideColumn(num) { Link Here
52
        if (!found) {
52
        if (!found) {
53
            valCookie.push(hide);
53
            valCookie.push(hide);
54
            var cookieString = valCookie.join("/");
54
            var cookieString = valCookie.join("/");
55
            Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax'  });
55
            Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
56
        }
56
        }
57
    } else {
57
    } else {
58
        Cookies.set("showColumns", hide, { expires: date, path: '/', sameSite: 'Lax'  });
58
        Cookies.set("showColumns", hide, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]'  });
59
    }
59
    }
60
}
60
}
61
61
Lines 88-94 function showColumn(num) { Link Here
88
        }
88
        }
89
        if (found) {
89
        if (found) {
90
            var cookieString = valCookie.join("/");
90
            var cookieString = valCookie.join("/");
91
            Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax'  });
91
            Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
92
        }
92
        }
93
    }
93
    }
94
}
94
}
Lines 113-119 function hideAllColumns() { Link Here
113
    $("#itemst td:nth-child("+nb_cols+"),#itemst tr th:nth-child("+nb_cols+")").nextAll().hide();
113
    $("#itemst td:nth-child("+nb_cols+"),#itemst tr th:nth-child("+nb_cols+")").nextAll().hide();
114
    $("#hideall").prop("checked", true).parent().addClass("selected");
114
    $("#hideall").prop("checked", true).parent().addClass("selected");
115
    var cookieString = allColumns.join("/");
115
    var cookieString = allColumns.join("/");
116
    Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: 'Lax'  });
116
    Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]'  });
117
}
117
}
118
118
119
$(document).ready(function () {
119
$(document).ready(function () {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-4 / +4 lines)
Lines 519-536 $(document).ready(function() { Link Here
519
            }
519
            }
520
        });
520
        });
521
        form_serialized = $(this).serialize();
521
        form_serialized = $(this).serialize();
522
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: 'Lax' });
522
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
523
        form_serialized_limits = [
523
        form_serialized_limits = [
524
            $('#language-limit').val(),   $('#branchloop').val(),
524
            $('#language-limit').val(),   $('#branchloop').val(),
525
            $('#subtype_audience').val(), $('#subtype_content').val(),
525
            $('#subtype_audience').val(), $('#subtype_content').val(),
526
            $('#subtype_format').val(),   $('#subtype_additional').val(),
526
            $('#subtype_format').val(),   $('#subtype_additional').val(),
527
            $('#locloop').val()
527
            $('#locloop').val()
528
        ];
528
        ];
529
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: 'Lax' });
529
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
530
        [% IF ( expanded_options ) %]
530
        [% IF ( expanded_options ) %]
531
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: 'Lax' });
531
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
532
        [% ELSE %]
532
        [% ELSE %]
533
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: 'Lax' });
533
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
534
        [% END %]
534
        [% END %]
535
    });
535
    });
536
536
(-)a/opac/sco/sco-main.pl (-2 / +1 lines)
Lines 382-388 $cookie = $query->cookie( Link Here
382
    -expires => $jwt ? '+1d' : '',
382
    -expires => $jwt ? '+1d' : '',
383
    -HttpOnly => 1,
383
    -HttpOnly => 1,
384
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
384
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
385
    -sameSite => 'Lax'
385
    -sameSite => C4::Context->preference('SameSiteSessionCookie')
386
);
386
);
387
387
388
$template->param(patronid => $patronid);
388
$template->param(patronid => $patronid);
389
- 

Return to bug 33259