Bugzilla – Attachment 172729 Details for
Bug 35570
Add a generic master form in ILL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35570: (QA follow-up): Standard backend: Fix OPAC CSRF
Bug-35570-QA-follow-up-Standard-backend-Fix-OPAC-C.patch (text/plain), 2.25 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-14 14:38:18 UTC
(
hide
)
Description:
Bug 35570: (QA follow-up): Standard backend: Fix OPAC CSRF
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-14 14:38:18 UTC
Size:
2.25 KB
patch
obsolete
>From 0fdd5785e8d2c93682cd9b36180d248eb1725ba7 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 7 Mar 2024 11:19:39 +0000 >Subject: [PATCH] Bug 35570: (QA follow-up): Standard backend: Fix OPAC CSRF > >Add FreeForm CSRF fix from https://github.com/PTFS-Europe/koha-ill-freeform/commit/6a37ce0daba8aab13130dacd055c9ca5876b7df4 into this work. >This is to keep this work up to date with latest FreeForm's fixes. > >The test plan to demonstrate the issue this patch fixes: >Test plan, k-t-d: > >1) Install FreeForm, enable ILL module, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) You'll have to switch the FreeForm branch to the one compatible with this work, i.e.: >cd /kohadevbox/koha/Koha/Illbackends/FreeForm >git checkout b_36243 >3) Restart plack: >koha-plack --restart kohadev >4) Go to OPAC ILL requests, login and visit: ><opac_url>/cgi-bin/koha/opac-illrequests.pl >5) Click "Create new request" >6) Change the 'type'. Notice you get a 403 error. Logs say: >Programming error - op 'add_form' must start with 'cud-' for POST >7) Apply patch. Restart plack. Repeat 6) >8) Notice the change type works as expected. Click "Create". >9) Notice the request is created as expected. >--- > Koha/ILL/Backend/opac-includes/create.inc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/ILL/Backend/opac-includes/create.inc b/Koha/ILL/Backend/opac-includes/create.inc >index 8b22848d7ea..91450d66d21 100644 >--- a/Koha/ILL/Backend/opac-includes/create.inc >+++ b/Koha/ILL/Backend/opac-includes/create.inc >@@ -17,6 +17,7 @@ > [% IF whole.stage == "form" %] > <h2>Create a manual ILL request</h2> > <form id="create_form" method="POST" action=""> >+ [% INCLUDE 'csrf-token.inc' %] > <fieldset class="rows"> > <legend>General details</legend> > <ol id="general-standard-fields"> >@@ -106,7 +107,7 @@ > <input id="ill-submit" class="btn btn-default" type="submit" value="Create"/> > <a class="cancel" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a> > </fieldset> >- <input type="hidden" name="method" value="create" /> >+ <input type="hidden" name="op" value="cud-create" /> > <input type="hidden" name="stage" value="form" /> > <input type="hidden" name="backend" value="Standard" /> > </form> >-- >2.47.0
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 35570
:
159942
|
159943
|
159944
|
159946
|
159947
|
160452
|
160457
|
160654
|
160655
|
160656
|
160657
|
160658
|
160659
|
160660
|
160686
|
161519
|
161520
|
161521
|
161522
|
161523
|
161524
|
162894
|
162897
|
162898
|
162899
|
162900
|
162901
|
162902
|
162903
|
162904
|
162905
|
164277
|
164278
|
164279
|
164280
|
164281
|
164282
|
164283
|
164284
|
165204
|
165205
|
165206
|
165207
|
165208
|
165209
|
165210
|
165211
|
165286
|
165287
|
165288
|
165289
|
165290
|
165291
|
165292
|
165293
|
167050
|
167051
|
171312
|
171313
|
171314
|
171315
|
171316
|
171317
|
171318
|
171319
|
171320
|
171321
|
171322
|
171323
|
172218
|
172219
|
172722
|
172723
|
172724
|
172725
|
172726
|
172727
|
172728
|
172729
|
172730
|
172731
|
172732
|
172733
|
172734
|
172735
|
172740
|
172741
|
172742
|
172743
|
172744
|
172745
|
172746
|
172747
|
172748
|
172749
|
172750
|
172751
|
172752
|
172753
|
172780
|
172809
|
172811
|
173916
|
173917
|
173918