From 5b155ada780f89fe05abaaa7e364633ee45cd15f Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 10 May 2024 15:09:21 +0000 Subject: [PATCH] Bug 19316: Add CSRF protection Signed-off-by: baptiste --- catalogue/updateitem.pl | 4 ++-- .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 64bc6b26827..8718653b38a 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -82,9 +82,9 @@ elsif ( $op eq "cud-set_public_note" ) { # i.e., itemnotes parameter passed from $item->bookable($bookable); } elsif ( $op eq "cud-set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { $item->damaged($damaged); -} elsif ( $op eq "set_sort1" && $sort1 ne $item_data_hashref->{'sort1'} ) { +} elsif ( $op eq "cud-set_sort1" && $sort1 ne $item_data_hashref->{'sort1'} ) { $item->sort1($sort1); -} elsif ( $op eq "set_sort2" && $sort2 ne $item_data_hashref->{'sort2'} ) { +} elsif ( $op eq "cud-set_sort2" && $sort2 ne $item_data_hashref->{'sort2'} ) { $item->sort2($sort2); } else { #nothings changed, so do nothing. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index db9e8b10ade..232b1c68368 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -386,8 +386,9 @@ Sort 1: [% IF ( CAN_user_editcatalogue_edit_items ) %]
+ [% INCLUDE 'csrf-token.inc' %] - +
[% ELSE %] @@ -398,8 +399,9 @@ Sort 2: [% IF ( CAN_user_editcatalogue_edit_items ) %]
+ [% INCLUDE 'csrf-token.inc' %] - +
[% ELSE %] -- 2.39.3 (Apple Git-146)