Bugzilla – Attachment 180818 Details for
Bug 39317
Saving a letter template can lead to a CSRF error on some installs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39317: Fix CSRF protection for letters
Bug-39317-Fix-CSRF-protection-for-letters.patch (text/plain), 1.72 KB, created by
Magnus Enger
on 2025-04-11 08:43:13 UTC
(
hide
)
Description:
Bug 39317: Fix CSRF protection for letters
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2025-04-11 08:43:13 UTC
Size:
1.72 KB
patch
obsolete
>From d3fe88f7825c78d07d9a1de7fe1a6e42a2a17c5b Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Wed, 12 Mar 2025 14:42:42 +0100 >Subject: [PATCH] Bug 39317: Fix CSRF protection for letters > >TEST PLAN: >1 - go to /cgi-bin/koha/tools/letter.pl >2 - click on New notice -> claim serial issue (or any other one) >3 - Fill required fields with random string >4 - Save -> if it breaks, go to >5 - Open a network panel (F12 -> network) >6 - Filter on letter.pl >7 - Fill another new notice -> the arguments of the form page have been > passed in the address of the POST request. >8 - Apply patch >9 - Repeat the whole process and see it works now > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >I can't recreate the problem, but the change seems sensible enough >and does not seem to introduce a regression, I can still save a >new letter/notice. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 2bc37a1264..f04b9e766d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -366,7 +366,7 @@ > </div> > <!-- /#toolbar --> > >- <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate"> >+ <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/letter.pl" class="validate"> > [% INCLUDE 'csrf-token.inc' %] > [% IF add_form %] > <input type="hidden" name="op" id="op" value="cud-add_validate" /> >-- >2.34.1
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 39317
:
179206
|
179209
|
180818
|
180893