Summary: | Remove unused href from Cancel hold link | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | Templates | Assignee: | Phil Ringnalda <phil> |
Status: | Pushed to stable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00,24.11.04
|
Circulation function: | |
Bug Depends on: | 34478 | ||
Bug Blocks: | |||
Attachments: |
Bug 38921: Remove unused href from Cancel hold link
Bug 38921: Remove unused href from Cancel hold link Bug 38921: Remove unused href from Cancel hold link |
Description
Phil Ringnalda
2025-01-17 22:22:34 UTC
Created attachment 176766 [details] [review] 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 Created attachment 176926 [details] [review] 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> Created attachment 177099 [details] [review] 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> Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.04 |