Summary: | Batch modifying patrons from patron lists broken by CSRF protection | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | Tools | Assignee: | Phil Ringnalda <phil> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, dcook, fridolin.somers, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37614 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes batch editing patrons from a patron list (Tools > Patrons and circulation > Patron lists > Actions > Batch edit patrons). When attempting to batch edit patrons, it didn't load the page to batch edit the patrons, and displayed the message "No patron card numbers or borrowernumbers given." (This is related to the CSRF changes added in Koha 24.05 to improve form security.)
|
Version(s) released in: |
24.11.00,24.05.04
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 36192 | ||
Attachments: |
Bug 37612: Batch patron modification should accept both cud-show and show ops
Bug 37612: Batch patron modification should accept both cud-show and show ops Bug 37612: Batch patron modification should accept both cud-show and show ops Bug 37612: Batch patron modification should accept both cud-show and show ops |
Description
Phil Ringnalda
2024-08-09 18:30:28 UTC
Created attachment 170223 [details] [review] Bug 37612: Batch patron modification should accept both cud-show and show ops Just like with batch item modification, batch patron modification can accept either a POST of a lot of data, which might be more than Apache's default URL length limit, or a GET of a little data. Or at least it could, if both the op 'cud-show' and the op 'show' were accepted. Show isn't doing any creation or updating or deleting, it just has to be cud-show because it needs to be able to accept large POSTs. So when it is only getting a little data, it should be willing to take a GET with op=show just like batch item modification does. Test plan: 1. Tools - Patron lists - New patron list - give it a name and Save 2. Type enough characters in the Patron search input to find a patron (I like ace for poor often-used Henry Acevedo) 3. Add patrons 4. Return to Patron lists, and in the Actions menu for your list, choose Batch edit patrons. Note that the page that loads doesn't show any patrons or UI to edit them, only a message about "No patron card numbers or borrowernumbers given." 5. Apply patch, restart_all 6. Repeat step 4, but this time get a page with your patron listed, and a form to change things about the patron record. Created attachment 170459 [details] [review] Bug 37612: Batch patron modification should accept both cud-show and show ops Just like with batch item modification, batch patron modification can accept either a POST of a lot of data, which might be more than Apache's default URL length limit, or a GET of a little data. Or at least it could, if both the op 'cud-show' and the op 'show' were accepted. Show isn't doing any creation or updating or deleting, it just has to be cud-show because it needs to be able to accept large POSTs. So when it is only getting a little data, it should be willing to take a GET with op=show just like batch item modification does. Test plan: 1. Without the patch, Tools - Patron lists - New patron list - give it a name and Save 2. Type enough characters in the Patron search input to find a patron (I like ace for poor often-used Henry Acevedo) and click on a patron in the list of results 3. Click Add patrons 4. Click Patron lists, and in the Actions menu for your list, choose Batch edit patrons. Note that the page that loads doesn't show any patrons or UI to edit them, only a message about "No patron card numbers or borrowernumbers given." 5. Apply patch, restart_all 6. Repeat step 4, but this time get a page with your patron listed, and a form to change things about the patron record. Sponsored-by: Chetco Community Public Library Created attachment 170462 [details] [review] Bug 37612: Batch patron modification should accept both cud-show and show ops Just like with batch item modification, batch patron modification can accept either a POST of a lot of data, which might be more than Apache's default URL length limit, or a GET of a little data. Or at least it could, if both the op 'cud-show' and the op 'show' were accepted. Show isn't doing any creation or updating or deleting, it just has to be cud-show because it needs to be able to accept large POSTs. So when it is only getting a little data, it should be willing to take a GET with op=show just like batch item modification does. Test plan: 1. Without the patch, Tools - Patron lists - New patron list - give it a name and Save 2. Type enough characters in the Patron search input to find a patron (I like ace for poor often-used Henry Acevedo) and click on a patron in the list of results 3. Click Add patrons 4. Click Patron lists, and in the Actions menu for your list, choose Batch edit patrons. Note that the page that loads doesn't show any patrons or UI to edit them, only a message about "No patron card numbers or borrowernumbers given." 5. Apply patch, restart_all 6. Repeat step 4, but this time get a page with your patron listed, and a form to change things about the patron record. Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> This sounds all right. Created attachment 170528 [details] [review] Bug 37612: Batch patron modification should accept both cud-show and show ops Just like with batch item modification, batch patron modification can accept either a POST of a lot of data, which might be more than Apache's default URL length limit, or a GET of a little data. Or at least it could, if both the op 'cud-show' and the op 'show' were accepted. Show isn't doing any creation or updating or deleting, it just has to be cud-show because it needs to be able to accept large POSTs. So when it is only getting a little data, it should be willing to take a GET with op=show just like batch item modification does. Test plan: 1. Without the patch, Tools - Patron lists - New patron list - give it a name and Save 2. Type enough characters in the Patron search input to find a patron (I like ace for poor often-used Henry Acevedo) and click on a patron in the list of results 3. Click Add patrons 4. Click Patron lists, and in the Actions menu for your list, choose Batch edit patrons. Note that the page that loads doesn't show any patrons or UI to edit them, only a message about "No patron card numbers or borrowernumbers given." 5. Apply patch, restart_all 6. Repeat step 4, but this time get a page with your patron listed, and a form to change things about the patron record. Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.04 Not for 23.11.x This fixes a bug - no interface changes, so no updates to the manual required. |