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

(-)a/C4/Auth.pm (-9 / +9 lines)
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'),
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')
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'),
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'),
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'),
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'),
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')
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')
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')
1598
            );
1598
            );
1599
            if ( $return == 1 ) {
1599
            if ( $return == 1 ) {
1600
                my (
1600
                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 347-353 sub getlanguagecookie { Link Here
347
        -value   => $language,
347
        -value   => $language,
348
        -HttpOnly => 1,
348
        -HttpOnly => 1,
349
        -expires => '+3y',
349
        -expires => '+3y',
350
        -sameSite => 'Lax',
350
        -sameSite => C4::Context->preference('SameSiteSessionCookie'),
351
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
351
        -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
352
    );
352
    );
353
353
(-)a/cataloguing/additem.pl (-2 / +2 lines)
Lines 213-219 if ($load_template_submit || $unload_template_submit) { Link Here
213
        -value    => $cookie_value,
213
        -value    => $cookie_value,
214
        -HttpOnly => 1,
214
        -HttpOnly => 1,
215
        -expires  => '',
215
        -expires  => '',
216
        -sameSite => 'Lax'
216
        -sameSite => C4::Context->preference('SameSiteSessionCookie')
217
    );
217
    );
218
218
219
    $cookie = [ $cookie, $template_cookie ];
219
    $cookie = [ $cookie, $template_cookie ];
Lines 336-342 if ($op eq "additem") { Link Here
336
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
336
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
337
                    -HttpOnly => 1,
337
                    -HttpOnly => 1,
338
                    -expires => '',
338
                    -expires => '',
339
                    -sameSite => 'Lax'
339
                    -sameSite => C4::Context->preference('SameSiteSessionCookie')
340
                );
340
                );
341
341
342
                $cookie = [ $cookie, $last_created_item_cookie ];
342
                $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 1225-1231 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
1225
        $( '#switch-editor' ).click( function() {
1225
        $( '#switch-editor' ).click( function() {
1226
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
1226
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
1227
1227
1228
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: 'Lax'} );
1228
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
1229
1229
1230
            if ( state.backend == 'catalog' ) {
1230
            if ( state.backend == 'catalog' ) {
1231
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
1231
                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 MARC frameworks › Administration › Koha 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 / +5 lines)
Lines 140-146 Link Here
140
140
141
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
141
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
142
142
143
            Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax'  } );
143
            Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
144
144
145
            var biblionumber = [% biblionumber || "null" | html %];
145
            var biblionumber = [% biblionumber || "null" | html %];
146
146
Lines 518-528 function PopupMARCFieldDoc(field) { Link Here
518
    function toggleMARCdocLinks(flag){
518
    function toggleMARCdocLinks(flag){
519
        if( flag === true ){
519
        if( flag === true ){
520
            $(".marcdocs").show();
520
            $(".marcdocs").show();
521
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
521
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
522
            $("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
522
            $("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
523
        } else {
523
        } else {
524
            $(".marcdocs").hide();
524
            $(".marcdocs").hide();
525
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
525
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
526
            $("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
526
            $("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
527
        }
527
        }
528
    }
528
    }
Lines 531-542 function PopupMARCFieldDoc(field) { Link Here
531
        if( flag === true ){
531
        if( flag === true ){
532
            $(".tagnum").show();
532
            $(".tagnum").show();
533
            $(".subfieldcode").show();
533
            $(".subfieldcode").show();
534
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
534
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
535
            $("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
535
            $("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
536
        } else {
536
        } else {
537
            $(".tagnum").hide();
537
            $(".tagnum").hide();
538
            $(".subfieldcode").hide();
538
            $(".subfieldcode").hide();
539
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
539
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
540
            $("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
540
            $("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
541
        }
541
        }
542
    }
542
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +1 lines)
Lines 303-309 Link Here
303
            });
303
            });
304
304
305
            $("#useadvanced").click(function(){
305
            $("#useadvanced").click(function(){
306
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
306
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
307
                return true;
307
                return true;
308
            });
308
            });
309
309
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt (-1 / +1 lines)
Lines 230-236 Link Here
230
        });
230
        });
231
231
232
        $("#useadvanced").click(function(){
232
        $("#useadvanced").click(function(){
233
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
233
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
234
            return true;
234
            return true;
235
        });
235
        });
236
    });
236
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt (-1 / +1 lines)
Lines 242-248 Link Here
242
        function SearchToHold(club_id) {
242
        function SearchToHold(club_id) {
243
            var date = new Date();
243
            var date = new Date();
244
            date.setTime(date.getTime() + (10 * 60 * 1000));
244
            date.setTime(date.getTime() + (10 * 60 * 1000));
245
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: 'Lax'  });
245
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
246
            location.href="/cgi-bin/koha/catalogue/search.pl";
246
            location.href="/cgi-bin/koha/catalogue/search.pl";
247
        }
247
        }
248
    </script>
248
    </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 256-262 $(document).ready(function() { Link Here
256
        $('#issues-table-load-immediately').prop('checked', true);
256
        $('#issues-table-load-immediately').prop('checked', true);
257
    }
257
    }
258
    $('#issues-table-load-immediately').on( "change", function(){
258
    $('#issues-table-load-immediately').on( "change", function(){
259
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax'  });
259
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
260
    });
260
    });
261
261
262
    function RefreshIssuesTable() {
262
    function RefreshIssuesTable() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-1 / +1 lines)
Lines 160-165 function printx_window(print_type) { Link Here
160
function searchToHold(){
160
function searchToHold(){
161
    var date = new Date();
161
    var date = new Date();
162
    date.setTime(date.getTime() + (10 * 60 * 1000));
162
    date.setTime(date.getTime() + (10 * 60 * 1000));
163
    Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: 'Lax'  });
163
    Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
164
    location.href="/cgi-bin/koha/catalogue/search.pl";
164
    location.href="/cgi-bin/koha/catalogue/search.pl";
165
}
165
}
(-)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 523-540 $(document).ready(function() { Link Here
523
            }
523
            }
524
        });
524
        });
525
        form_serialized = $(this).serialize();
525
        form_serialized = $(this).serialize();
526
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: 'Lax' });
526
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
527
        form_serialized_limits = [
527
        form_serialized_limits = [
528
            $('#language-limit').val(),   $('#branchloop').val(),
528
            $('#language-limit').val(),   $('#branchloop').val(),
529
            $('#subtype_audience').val(), $('#subtype_content').val(),
529
            $('#subtype_audience').val(), $('#subtype_content').val(),
530
            $('#subtype_format').val(),   $('#subtype_additional').val(),
530
            $('#subtype_format').val(),   $('#subtype_additional').val(),
531
            $('#locloop').val()
531
            $('#locloop').val()
532
        ];
532
        ];
533
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: 'Lax' });
533
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
534
        [% IF ( expanded_options ) %]
534
        [% IF ( expanded_options ) %]
535
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: 'Lax' });
535
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
536
        [% ELSE %]
536
        [% ELSE %]
537
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: 'Lax' });
537
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
538
        [% END %]
538
        [% END %]
539
    });
539
    });
540
540
(-)a/opac/sco/sco-main.pl (-2 / +1 lines)
Lines 375-381 $cookie = $query->cookie( Link Here
375
    -expires => $jwt ? '+1d' : '',
375
    -expires => $jwt ? '+1d' : '',
376
    -HttpOnly => 1,
376
    -HttpOnly => 1,
377
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
377
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
378
    -sameSite => 'Lax'
378
    -sameSite => C4::Context->preference('SameSiteSessionCookie')
379
);
379
);
380
380
381
$template->param(patronid => $patronid);
381
$template->param(patronid => $patronid);
382
- 

Return to bug 33259