[Bug 38921] New: Remove unused href from Cancel hold link
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Bug ID: 38921 Summary: Remove unused href from Cancel hold link Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org Depends on: 34478 We use koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc to display the list of existing holds in reserve/request.pl when you are placing a hold. The cancel button-links are JavaScript-only, showing a confirm modal and then POSTing a form from there, since the op is cud-cancel and has to be a POST. But we left behind a pre-CSRF href attribute which is a double false-positive for me, since it has both op=cancel and uses the Template Toolkit html filter rather than the uri filter for things inserted in a URL parameter. You can see that it doesn't do anything by right-clicking and opening it in a new tab - there's no op named cancel, so it just displays the existing holds and lets you add one, repeating the page you opened the link from, only with garbage after the request.pl? in your URL. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34478 [Bug 34478] Full CSRF protection -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 --- Comment #1 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 176766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176766&action=edit Bug 38921: Remove unused href from Cancel hold link The trashcan icon to cancel a hold from the list of holds on a bib record has a leftover href attribute from before the bug 34478 CSRF protection changes. It has an 'op=cancel' which does nothing since there's only a cud-cancel op, so it just falls through to the view case and redisplays the page if you open it in a new tab, and doesn't get used at all if you click the trashcan, when JavaScript builds up a form that you can POST. Test plan: 1. Place a hold on any item. 2. On the list of holds, right-click the Cancel hold trashcan icon, and select Open in new tab 3. In the new tab, note that the URL in the browser address bar shows all sorts of things about op=cancel and borrowernumber and biblionumber and reserveid, but nothing changed, your hold wasn't deleted 4. Close that pointless tab, and apply patch 5. Reload the page with the list of holds, and again right-click the Cancel hold trashcan and select Open in new tab 6. In the new tab, note that the URL just has the biblionumber and a #, no other extraneous things 7. In the original tab, left-click the trashcan, confirm cancellation in the popup, and make sure that cancelling still does work. Sponsored-by: Chetco Community Public Library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176766|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 176926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176926&action=edit Bug 38921: Remove unused href from Cancel hold link The trashcan icon to cancel a hold from the list of holds on a bib record has a leftover href attribute from before the bug 34478 CSRF protection changes. It has an 'op=cancel' which does nothing since there's only a cud-cancel op, so it just falls through to the view case and redisplays the page if you open it in a new tab, and doesn't get used at all if you click the trashcan, when JavaScript builds up a form that you can POST. Test plan: 1. Place a hold on any item. 2. On the list of holds, right-click the Cancel hold trashcan icon, and select Open in new tab 3. In the new tab, note that the URL in the browser address bar shows all sorts of things about op=cancel and borrowernumber and biblionumber and reserveid, but nothing changed, your hold wasn't deleted 4. Close that pointless tab, and apply patch 5. Reload the page with the list of holds, and again right-click the Cancel hold trashcan and select Open in new tab 6. In the new tab, note that the URL just has the biblionumber and a #, no other extraneous things 7. In the original tab, left-click the trashcan, confirm cancellation in the popup, and make sure that cancelling still does work. Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176926|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 177099 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177099&action=edit Bug 38921: Remove unused href from Cancel hold link The trashcan icon to cancel a hold from the list of holds on a bib record has a leftover href attribute from before the bug 34478 CSRF protection changes. It has an 'op=cancel' which does nothing since there's only a cud-cancel op, so it just falls through to the view case and redisplays the page if you open it in a new tab, and doesn't get used at all if you click the trashcan, when JavaScript builds up a form that you can POST. Test plan: 1. Place a hold on any item. 2. On the list of holds, right-click the Cancel hold trashcan icon, and select Open in new tab 3. In the new tab, note that the URL in the browser address bar shows all sorts of things about op=cancel and borrowernumber and biblionumber and reserveid, but nothing changed, your hold wasn't deleted 4. Close that pointless tab, and apply patch 5. Reload the page with the list of holds, and again right-click the Cancel hold trashcan and select Open in new tab 6. In the new tab, note that the URL just has the biblionumber and a #, no other extraneous things 7. In the original tab, left-click the trashcan, confirm cancellation in the popup, and make sure that cancelling still does work. Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.05.00 |25.05.00,24.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 24.11.x for 24.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Bug 38921 depends on bug 34478, which changed state. Bug 34478 Summary: Full CSRF protection https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34478 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38921 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #6 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Depends on bug not in 22.11.x Not backporting to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org