Summary: | Item circulation alerts table appears to be broken | ||
---|---|---|---|
Product: | Koha | Reporter: | Esther Melander <esther.melander> |
Component: | Staff interface | Assignee: | Phil Ringnalda <phil> |
Status: | RESOLVED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P3 | CC: | fridolin.somers, gmcharlt, lucas, m.de.rooy, martin.renvoize, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37979 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.05
|
|
Circulation function: | |||
Bug Depends on: | 36192 | ||
Bug Blocks: | |||
Attachments: |
Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token
Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token |
Description
Esther Melander
2024-09-18 19:24:57 UTC
Well, one thing happens when you have the browser console open: POST /cgi-bin/koha/admin/item_circulation_alerts.pl returns a 403, since the ajax request doesn't include the csrf_token. Created attachment 171699 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library Created attachment 171701 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library https://bugs.koha-community.org/show_bug.cgi?id=37959 Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Created attachment 171821 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Katrin has pushed this, but the bug number in the commit doesn't correspond to the bug number here so it didn't get closed.. Closing on her behalf now Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant (In reply to Martin Renvoize (ashimema) from comment #6) > Thanks for all the hard work! > > Pushed to main for the next 24.11.00 release as RM Assistant Thanks for noticing, I will keep a note for checking in the release notes. I can't find the correct commit in main to cherry-pick: kohadev-koha@kohadevbox:koha(rmain2405)$ git log --pretty=oneline main | grep '37959' 000668a6fb1a7d6e0b58785a5fc827e3155b27bb Bug 37959: Correct bug number mistake. Going to just git bz apply this one Backported to 24.05.x for upcoming 24.05.05 It was https://git.koha-community.org/Koha-community/Koha/commit/66eabead5f9a2041c864da197deed38733ffefef I'll try to stop thinking I can type bug numbers in commits, and only copy-paste them. There was a mistake in the bug number in the attached patch file (might want to fix before you push): https://git.koha-community.org/Koha-community/Koha/commits/branch/main/search?q=37979&all= Not for 23.11.x |