From bugzilla-daemon@bugs.koha-community.org Thu Mar 6 12:51:22 2025 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 37266] patron_lists/delete.pl should have CSRF protection Date: Thu, 06 Mar 2025 11:51:21 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5177041388361429402==" --===============5177041388361429402== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D37266 Katrin Fischer changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178579|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer --- Comment on attachment 178579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D178579 Bug 37266: [24.11.x] patron_lists/delete.pl should have CSRF protection >From 6c321cdefe352c5369b36c34aafb7fa364cd33d4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard >Date: Mon, 24 Feb 2025 14:44:03 +0000 >Subject: [PATCH] Bug 37266: [24.11.x] patron_lists/delete.pl should have CSRF > protection > >This patch adds CSRF protection to patron list deletions. > >Also changed: The "Delete selected lists" button is now in a floating >toolbar. > >To test, apply the patch and go to Tools -> Patron lists. > >- If necessary, create a few patron lists. >- Test the two methods for list deletion available on the page: > - Check one or more checkboxes and then click the "Delete selected > lists" at the top of the page. > - Click the "Actions" button for an individual list and choose "Delete > list." >- Open the checkout page for a patron. > - Under the "Patron lists" tab, add the patron to a list. > - Click the "Actions" button for an that list and choose "Delete > list." > - When you are taken to the patron lists page the list should have > been deleted. >- Perform the same test on the patron details page. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Phil Ringnalda >Signed-off-by: Julian Maurice >--- > .../prog/en/modules/circ/circulation.tt | 1 + > .../prog/en/modules/members/moremember.tt | 1 + > .../prog/en/modules/patron_lists/lists.tt | 67 +++++++++++-------- > .../modules/patron_lists/patron-lists-tab.tt | 7 +- > patron_lists/delete.pl | 15 +++-- > 5 files changed, 56 insertions(+), 35 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/k= oha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index a3c9d73f1bb..fc77a84b8db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1167,6 +1167,7 @@ > [% Asset.js("js/checkouts.js") | $raw %] > [% Asset.js("js/tables/bookings.js") | $raw %] > [% Asset.js("js/recalls.js") | $raw %] >+ [% Asset.js("js/form-submit.js") | $raw %] > [% END %] >=20 > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b= /koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index a12b9e3a504..c25adbf4b11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -776,6 +776,7 @@ > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > [% Asset.js("js/recalls.js") | $raw %] >+ [% Asset.js("js/form-submit.js") | $raw %] >