Bugzilla – Attachment 154165 Details for
Bug 34369
Add CSRF protection to system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34369: Fix 'Did you mean'
Bug-34369-Fix-Did-you-mean.patch (text/plain), 1.62 KB, created by
Jonathan Druart
on 2023-08-03 08:04:07 UTC
(
hide
)
Description:
Bug 34369: Fix 'Did you mean'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-08-03 08:04:07 UTC
Size:
1.62 KB
patch
obsolete
>From 38f9a94d97406570295b6c38010844c21b657852 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Aug 2023 10:01:32 +0200 >Subject: [PATCH] Bug 34369: Fix 'Did you mean' > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >index ae0b86856e6..3323c14a21d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Asset %] >+[% USE Koha %] > [% SET footerjs = 1 %] > [% BLOCK pluginlist %] > <div class="pluginlist"> >@@ -62,6 +63,7 @@ > plugins that you want to use. > </div> > <form action="/cgi-bin/koha/admin/didyoumean.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] > <fieldset id="didyoumeanopac"> > <legend>OPAC</legend> > [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %] >@@ -105,7 +107,8 @@ > function yesimeant() { > var OPACdidyoumean = serialize_plugins('opac'); > >- var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean); >+ const csrf_token = "[% Koha.GenerateCSRF | $raw %]"; >+ let data = "pref_OPACdidyoumean=%s&csrf_token=%s".format(encodeURIComponent(OPACdidyoumean), csrf_token); > > $.ajax({ > data: data, >-- >2.25.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 34369
:
154121
|
154122
|
154163
|
154164
|
154165
|
154237
|
154238
|
154239