Summary: | Cannot manage suggestions without CSRF error | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Circulation | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | major | ||
Priority: | P5 - low | CC: | 1joynelson, apirak, dcook, didier.gautheron, fridolin.somers, gmcharlt, jbalway, jonathan.druart, kebliss, kelly, kyle.m.hall, laurent.ducos, lucas, m.de.rooy, martin.renvoize, matt.blenkinsop, nick, pedro.amorim, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34080 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.10,22.05.16
|
|
Circulation function: | |||
Bug Depends on: | 22990 | ||
Bug Blocks: | |||
Attachments: |
Bug 34601: Pass module into params
Bug 34601: Fix edit/delete links on suggestion.tt Bug 34601: Fix edit/delete links on suggestion.tt Bug 34601: Fix edit/delete links on suggestion.tt Bug 34601: (QA follow-up) Fix edit/delete links in toolbar Bug 34601: [22.11.x]Fix edit/delete links on suggestion.tt Bug 34601: Fix wrong quote Bug 34601: [22.05.x] Fix edit/delete links on suggestion.tt |
Description
Lucas Gass (lukeg)
2023-08-23 17:45:47 UTC
It looks like the params->{module} doesn't get passed so it output_and_exit_if_error exits. Created attachment 154719 [details] [review] Bug 34601: Pass module into params 1. Make a suggestion 2. Try to edit, delete, or manage the suggestion. 3. Error: 4. Apply patch and restart_all 5. Try again and you should not get the error anymore. Created attachment 154720 [details] [review] Bug 34601: Fix edit/delete links on suggestion.tt 1. Make a suggestion 2. Try to edit, delete the suggestion. 3. Error: 4. Apply patch and restart_all 5. Try again and you should not get the error anymore. Marked as major as it prevents libraries from managing suggestions. Created attachment 154724 [details] [review] Bug 34601: Fix edit/delete links on suggestion.tt 1. Make a suggestion 2. Try to edit, delete the suggestion. 3. Error: 4. Apply patch and restart_all 5. Try again and you should not get the error anymore. Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Lucas, please remember to run the new perltidy on your changes and the QA test tools! (I amended the patch) Created attachment 154747 [details] [review] Bug 34601: Fix edit/delete links on suggestion.tt 1. Make a suggestion 2. Try to edit, delete the suggestion. 3. Error: 4. Apply patch and restart_all 5. Try again and you should not get the error anymore. Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 154748 [details] [review] Bug 34601: (QA follow-up) Fix edit/delete links in toolbar We also need to fix the links in the toolbar visible when 'viewing' the suggestion. 1) Create a suggestion 2) Click on the title 3) Click edit > CSRF error 4) Click delete link in toolbar > CSRF error 5) Apply patch and repeat Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 154762 [details] [review] Bug 34601: [22.11.x]Fix edit/delete links on suggestion.tt Lucas, did you see my follow-up? the original patch was incomplete. (In reply to Katrin Fischer from comment #10) > Lucas, did you see my follow-up? the original patch was incomplete. Yes, I did. Thanks! I squashed those together for the 22.11 one. (In reply to Lucas Gass from comment #11) > (In reply to Katrin Fischer from comment #10) > > Lucas, did you see my follow-up? the original patch was incomplete. > > Yes, I did. Thanks! I squashed those together for the 22.11 one. All good then :) Beware.. I think the archive/unarchive links also need the same treatment ;P I'll look into providing another follow-up. (In reply to Martin Renvoize from comment #13) > Beware.. I think the archive/unarchive links also need the same treatment ;P I just tested the archiving and unarchiving of a suggestion and they still work without any error with the other 2 patches applied. Excellent, that's good news. Thanks for testing it. The need for the follow-up makes it suspicious. Aren't we over-requiring CSRF tokens here? Pushed to master for 23.11. Nice work everyone, thanks! Ich, Typo in commit of master : https://git.koha-community.org/Koha-community/Koha/src/commit/7d5dc65867a55045fa32189d177379e70ecf5725/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt#L850 <a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% s.suggestionid | html %]"&csrf_token=[% csrf_token | html %]> Double quote misplaced. Can we get this backported? Created attachment 154951 [details] [review] Bug 34601: Fix wrong quote Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (In reply to Fridolin Somers from comment #19) > Ich, > > Typo in commit of master : Thanks! Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x Thanks for the 22.11 patch! It happend on 22.05.15. Can we get this backported? Created attachment 156122 [details] [review] Bug 34601: [22.05.x] Fix edit/delete links on suggestion.tt Backported to 22.05.x for upcoming 22.05.16 |