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 842-848 sub checkauth { Link Here
842
            -value    => '',
842
            -value    => '',
843
            -HttpOnly => 1,
843
            -HttpOnly => 1,
844
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
844
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
845
            -sameSite => 'Lax',
845
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
846
        ));
846
        ));
847
        $loggedin = 1;
847
        $loggedin = 1;
848
    }
848
    }
Lines 915-921 sub checkauth { Link Here
915
                    -value    => $session->id,
915
                    -value    => $session->id,
916
                    -HttpOnly => 1,
916
                    -HttpOnly => 1,
917
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
917
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
918
                    -sameSite => 'Lax',
918
                    -sameSite => C4::Context->preference('SameSiteSessionCookie'),
919
                ));
919
                ));
920
920
921
                $flags = haspermission( $userid, $flagsrequired );
921
                $flags = haspermission( $userid, $flagsrequired );
Lines 987-993 sub checkauth { Link Here
987
            -value    => $sessionID,
987
            -value    => $sessionID,
988
            -HttpOnly => 1,
988
            -HttpOnly => 1,
989
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
989
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
990
            -sameSite => 'Lax',
990
            -sameSite =>  C4::Context->preference('SameSiteSessionCookie'),
991
        ));
991
        ));
992
        my $pki_field = C4::Context->preference('AllowPKIAuth');
992
        my $pki_field = C4::Context->preference('AllowPKIAuth');
993
        if ( !defined($pki_field) ) {
993
        if ( !defined($pki_field) ) {
Lines 1195-1201 sub checkauth { Link Here
1195
                                -value    => '',
1195
                                -value    => '',
1196
                                -HttpOnly => 1,
1196
                                -HttpOnly => 1,
1197
                                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1197
                                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1198
                                -sameSite => 'Lax',
1198
                                -sameSite => C4::Context->preference('SameSiteSessionCookie'),
1199
                            ));
1199
                            ));
1200
                            $info{'wrongip'} = 1;
1200
                            $info{'wrongip'} = 1;
1201
                        }
1201
                        }
Lines 1304-1310 sub checkauth { Link Here
1304
                -value    => '',
1304
                -value    => '',
1305
                -HttpOnly => 1,
1305
                -HttpOnly => 1,
1306
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1306
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1307
                -sameSite => 'Lax',
1307
                -sameSite => C4::Context->preference('SameSiteSessionCookie'),
1308
            ));
1308
            ));
1309
        }
1309
        }
1310
1310
Lines 1470-1476 sub checkauth { Link Here
1470
            charset           => 'utf-8',
1470
            charset           => 'utf-8',
1471
            cookie            => $cookie,
1471
            cookie            => $cookie,
1472
            'X-Frame-Options' => 'SAMEORIGIN',
1472
            'X-Frame-Options' => 'SAMEORIGIN',
1473
            -sameSite => 'Lax'
1473
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
1474
        }
1474
        }
1475
      ),
1475
      ),
1476
      $template->output;
1476
      $template->output;
Lines 1554-1560 sub check_api_auth { Link Here
1554
            -value    => $session->id,
1554
            -value    => $session->id,
1555
            -HttpOnly => 1,
1555
            -HttpOnly => 1,
1556
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1556
            -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1557
            -sameSite => 'Lax'
1557
            -sameSite => C4::Context->preference('SameSiteSessionCookie')
1558
        );
1558
        );
1559
        return ( $return, $cookie, $session ); # return == 'ok' here
1559
        return ( $return, $cookie, $session ); # return == 'ok' here
1560
1560
Lines 1595-1601 sub check_api_auth { Link Here
1595
                -value    => $sessionID,
1595
                -value    => $sessionID,
1596
                -HttpOnly => 1,
1596
                -HttpOnly => 1,
1597
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1597
                -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
1598
                -sameSite => 'Lax'
1598
                -sameSite => C4::Context->preference('SameSiteSessionCookie')
1599
            );
1599
            );
1600
            if ( $return == 1 ) {
1600
            if ( $return == 1 ) {
1601
                my (
1601
                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 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 347-353 if ($op eq "additem") { Link Here
347
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
347
                    -value   => encode_base64url( freeze( { %{$item->unblessed}, itemnumber => undef } ) ),
348
                    -HttpOnly => 1,
348
                    -HttpOnly => 1,
349
                    -expires => '',
349
                    -expires => '',
350
                    -sameSite => 'Lax'
350
                    -sameSite => C4::Context->preference('SameSiteSessionCookie')
351
                );
351
                );
352
352
353
                $cookie = [ $cookie, $last_created_item_cookie ];
353
                $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 1226-1232 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
1226
        $( '#switch-editor' ).click( function() {
1226
        $( '#switch-editor' ).click( function() {
1227
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
1227
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
1228
1228
1229
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: 'Lax'} );
1229
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
1230
1230
1231
            if ( state.backend == 'catalog' ) {
1231
            if ( state.backend == 'catalog' ) {
1232
                window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
1232
                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 325-331 MARC frameworks › Administration › Koha Link Here
325
            }));
325
            }));
326
            $("#select_display").on("change",function(){
326
            $("#select_display").on("change",function(){
327
                var checked = $(this).prop("checked") ? 1: 0;
327
                var checked = $(this).prop("checked") ? 1: 0;
328
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
328
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
329
                this.form.submit();
329
                this.form.submit();
330
            });
330
            });
331
        });
331
        });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-5 / +6 lines)
Lines 143-149 Link Here
143
143
144
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
144
            if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false;
145
145
146
            Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax'  } );
146
            Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
147
147
148
            var biblionumber = [% biblionumber || "null" | html %];
148
            var biblionumber = [% biblionumber || "null" | html %];
149
149
Lines 512-522 function PopupMARCFieldDoc(field) { Link Here
512
    function toggleMARCdocLinks(flag){
512
    function toggleMARCdocLinks(flag){
513
        if( flag === true ){
513
        if( flag === true ){
514
            $(".marcdocs").show();
514
            $(".marcdocs").show();
515
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
515
516
            Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
516
            $("#marcDocsSelect i").addClass('fa-check-square').removeClass('fa-square');
517
            $("#marcDocsSelect i").addClass('fa-check-square').removeClass('fa-square');
517
        } else {
518
        } else {
518
            $(".marcdocs").hide();
519
            $(".marcdocs").hide();
519
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
520
            Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
520
            $("#marcDocsSelect i").removeClass('fa-check-square').addClass('fa-square');
521
            $("#marcDocsSelect i").removeClass('fa-check-square').addClass('fa-square');
521
        }
522
        }
522
    }
523
    }
Lines 525-536 function PopupMARCFieldDoc(field) { Link Here
525
        if( flag === true ){
526
        if( flag === true ){
526
            $(".tagnum").show();
527
            $(".tagnum").show();
527
            $(".subfieldcode").show();
528
            $(".subfieldcode").show();
528
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: 'Lax'  });
529
            Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
529
            $("#marcTagsSelect i").addClass('fa-check-square').removeClass('fa-square');
530
            $("#marcTagsSelect i").addClass('fa-check-square').removeClass('fa-square');
530
        } else {
531
        } else {
531
            $(".tagnum").hide();
532
            $(".tagnum").hide();
532
            $(".subfieldcode").hide();
533
            $(".subfieldcode").hide();
533
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: 'Lax'  });
534
            Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
534
            $("#marcTagsSelect i").removeClass('fa-check-square').addClass('fa-square');
535
            $("#marcTagsSelect i").removeClass('fa-check-square').addClass('fa-square');
535
        }
536
        }
536
    }
537
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +1 lines)
Lines 295-301 Link Here
295
            });
295
            });
296
296
297
            $("#useadvanced").click(function(){
297
            $("#useadvanced").click(function(){
298
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
298
                Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
299
                return true;
299
                return true;
300
            });
300
            });
301
301
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt (-1 / +1 lines)
Lines 236-242 Link Here
236
        });
236
        });
237
237
238
        $("#useadvanced").click(function(){
238
        $("#useadvanced").click(function(){
239
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
239
            Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } );
240
            return true;
240
            return true;
241
        });
241
        });
242
    });
242
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt (-1 / +1 lines)
Lines 235-241 Link Here
235
        function SearchToHold(club_id) {
235
        function SearchToHold(club_id) {
236
            var date = new Date();
236
            var date = new Date();
237
            date.setTime(date.getTime() + (10 * 60 * 1000));
237
            date.setTime(date.getTime() + (10 * 60 * 1000));
238
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: 'Lax'  });
238
            Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
239
            location.href="/cgi-bin/koha/catalogue/search.pl";
239
            location.href="/cgi-bin/koha/catalogue/search.pl";
240
        }
240
        }
241
    </script>
241
    </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 265-271 $(document).ready(function() { Link Here
265
        $('#issues-table-load-delay').hide();
265
        $('#issues-table-load-delay').hide();
266
    }
266
    }
267
    $('#issues-table-load-immediately').on( "change", function(){
267
    $('#issues-table-load-immediately').on( "change", function(){
268
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: 'Lax'  });
268
        Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
269
    });
269
    });
270
270
271
    function RefreshIssuesTable() {
271
    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 524-541 $(document).ready(function() { Link Here
524
            }
524
            }
525
        });
525
        });
526
        form_serialized = $(this).serialize();
526
        form_serialized = $(this).serialize();
527
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: 'Lax' });
527
        Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
528
        form_serialized_limits = [
528
        form_serialized_limits = [
529
            $('#language-limit').val(),   $('#branchloop').val(),
529
            $('#language-limit').val(),   $('#branchloop').val(),
530
            $('#subtype_audience').val(), $('#subtype_content').val(),
530
            $('#subtype_audience').val(), $('#subtype_content').val(),
531
            $('#subtype_format').val(),   $('#subtype_additional').val(),
531
            $('#subtype_format').val(),   $('#subtype_additional').val(),
532
            $('#locloop').val()
532
            $('#locloop').val()
533
        ];
533
        ];
534
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: 'Lax' });
534
        Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
535
        [% IF ( expanded_options ) %]
535
        [% IF ( expanded_options ) %]
536
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: 'Lax' });
536
            Cookies.set("search_path_code", 'exs', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
537
        [% ELSE %]
537
        [% ELSE %]
538
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: 'Lax' });
538
            Cookies.set("search_path_code", 'ads', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' });
539
        [% END %]
539
        [% END %]
540
    });
540
    });
541
541
(-)a/opac/sco/sco-main.pl (-2 / +1 lines)
Lines 372-378 $cookie = $query->cookie( Link Here
372
    -expires => $jwt ? '+1d' : '',
372
    -expires => $jwt ? '+1d' : '',
373
    -HttpOnly => 1,
373
    -HttpOnly => 1,
374
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
374
    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
375
    -sameSite => 'Lax'
375
    -sameSite => C4::Context->preference('SameSiteSessionCookie')
376
);
376
);
377
377
378
$template->param(patronid => $patronid);
378
$template->param(patronid => $patronid);
379
- 

Return to bug 33259