Bugzilla – Attachment 179209 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.52 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-03-12 14:16:31 UTC
(
hide
)
Description:
Bug 39317: Fix CSRF protection for letters
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-03-12 14:16:31 UTC
Size:
1.52 KB
patch
obsolete
>From 8f21fb9f9d71a9d0074cc9b4decf3dde655e3e83 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 >--- > 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 2bc37a12..f04b9e76 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.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 39317
:
179206
|
179209
|
180818
|
180893