Bugzilla – Attachment 167575 Details for
Bug 37039
Cannot request a discharge in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37039: Update discharge request with CSRF token
Bug-37039-Update-discharge-request-with-CSRF-token.patch (text/plain), 2.10 KB, created by
Julian Maurice
on 2024-06-07 13:07:04 UTC
(
hide
)
Description:
Bug 37039: Update discharge request with CSRF token
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-06-07 13:07:04 UTC
Size:
2.10 KB
patch
obsolete
>From c5d957ce9598032531054802210420f2960123dd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 5 Jun 2024 18:06:04 +0000 >Subject: [PATCH] Bug 37039: Update discharge request with CSRF token > >The OPAC discharge page used a link with a GET parameter, but the script >expects a POST request. This patch converts the link to a form with CSRF >token included. > >To test, apply the patch and enable the useDischarge system preference >if necessary. > >- Log in to the OPAC as a user with no checkouts or outstanding fees. >- Click the "Ask for discharge" tab in the sidebar of the user summary > page. >- Click the "Ask for a discharge" button. >- You should be redirected to a page that says "Your discharge request > has been sent." > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >index 6f061b22ca..96f019d796 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >@@ -52,7 +52,11 @@ > [% IF has_checkouts %] > <div class="alert alert-info">You cannot be discharged, you have checked out items. Please return items before asking for a discharge.</div> > [% ELSE %] >- <a class="btn btn-primary" href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a> >+ <form action="/cgi-bin/koha/opac-discharge.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" name="op" value="cud-request" /> >+ <button class="btn btn-primary" type="submit">Ask for a discharge</button> >+ </form> > [% END %] > > [% END %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37039
:
167490
|
167497
| 167575