Bugzilla – Attachment 167860 Details for
Bug 37111
OPAC renewal - CSRF "op must be set"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37111: Turn Renew link into a POST form
Bug-37111-Turn-Renew-link-into-a-POST-form.patch (text/plain), 2.94 KB, created by
Lucas Gass (lukeg)
on 2024-06-18 17:15:41 UTC
(
hide
)
Description:
Bug 37111: Turn Renew link into a POST form
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-06-18 17:15:41 UTC
Size:
2.94 KB
patch
obsolete
>From 4a8f0c7899a43b9adc59a168e277532965f979f9 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 18 Jun 2024 17:14:36 +0000 >Subject: [PATCH] Bug 37111: Turn Renew link into a POST form > >To test: >1. Check some items out to a patron >2. Set the username and apssword for the patron so that you can log in as that patron. >3. Log in to the OAPC as that patron. >4. Go to Your account > Summary (the default landing page after you log in). >5. Click "Renew" for one of the items. >6. You get the error as above. >7. APPLY PATCH >8. Try steps 1 -5 again, you should not get an error. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 89c8dfab4f..57242630a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -452,7 +452,14 @@ > [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %] > [% IF ( ISSUE.status ) %] > [% IF ( canrenew ) %] >- <input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&issue=[% ISSUE.issue_id | uri %]&borrowernumber=[% ISSUE.borrowernumber | uri %]">Renew</a> >+ <form action="/cgi-bin/koha/opac-renew.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" name="from" value="opac_user"> >+ <input type="hidden" name="issue" value="[% ISSUE.issue_id | html %]"> >+ <input type="hidden" name="borrowernumber" value="[% ISSUE.borrowernumber | html %]"> >+ <input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]"/> >+ <button class="btn btn-primary" type="submit">Renew</button> >+ </form> > [% END %] > [% IF ISSUE.renewalfee > 0 %] > <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span> >-- >2.39.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 37111
:
167860
|
167866
|
167867
|
167869
|
167870
|
167921
|
167922
|
168103
|
169157
|
169158