Bug 37064 - Spurious CSRF error logged by 500.pl when a POST request fails
Summary: Spurious CSRF error logged by 500.pl when a POST request fails
Status: RESOLVED DUPLICATE of bug 37040
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-10 18:06 UTC by Nick Clemens (kidclamp)
Modified: 2024-06-13 17:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-06-10 18:06:28 UTC
I haven't been able to set things up to recreate on KTD, but in production:
1 - Set an email for a patron and enable HOLD notifications
2 - Edit the HOLD letter to use a spurious item field [% item.itemcopynumber %]
3 - Place a hold for patron and confirm
4 - Error in logs
    ERROR PROCESSING TEMPLATE: undef error - The method Koha::Item->itemcopynumber is not covered by tests!
5 - But also:
    [WARN] Programming error - op 'cud-affect_reserve' must not start with 'cud-' for GET https://staff-library.provider.com/intraneterrors/500.pl (referer: https://staff-library.provider.com/cgi-bin/koha/circ/returns.pl) at /usr/share/koha/lib/Koha/Middleware/CSRF.pm line 82.

6 - The ErrorDocument middleware automatically transforms every request into a GET - so suddenly the cud- op is rejected
Comment 1 David Cook 2024-06-11 01:05:16 UTC
This is probably a duplicate of bug 37040
Comment 2 David Cook 2024-06-11 01:18:44 UTC
Can you check it out and let me know what you think?
Comment 3 Nick Clemens (kidclamp) 2024-06-13 17:10:54 UTC

*** This bug has been marked as a duplicate of bug 37040 ***