Bugzilla – Attachment 165537 Details for
Bug 36700
CSRF: Cannot save a systempreference (when nginx drops the CSRF header with an underscore)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36700: Add CSRF token to the systemprefences POST
Bug-36700-Add-CSRF-token-to-the-systemprefences-PO.patch (text/plain), 1.75 KB, created by
Marcel de Rooy
on 2024-04-25 12:45:22 UTC
(
hide
)
Description:
Bug 36700: Add CSRF token to the systemprefences POST
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-25 12:45:22 UTC
Size:
1.75 KB
patch
obsolete
>From 5f59b2f27c8b9440c2319fcf6ecf83a24cdc690e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 25 Apr 2024 12:43:51 +0000 >Subject: [PATCH] Bug 36700: Add CSRF token to the systemprefences POST >Content-Type: text/plain; charset=utf-8 > >Test plan: >Go to Admin/Preferences. >Change value and Save. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/js/fetch/system-preferences-api-client.js | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >index e2b9bcbac8..3a328c50d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/system-preferences-api-client.js >@@ -19,7 +19,7 @@ export class SysprefAPIClient extends HttpClient { > body: "pref_%s=%s".format( > encodeURIComponent(variable), > encodeURIComponent(value) >- ), >+ ).concat('&csrf_token=', this.csrf_token), > headers: { > "Content-Type": > "application/x-www-form-urlencoded;charset=utf-8", >@@ -37,7 +37,7 @@ export class SysprefAPIClient extends HttpClient { > : "%s=".format(variable) > ) > .flat(Infinity) >- .join("&"), >+ .join("&").concat('&csrf_token=', this.csrf_token), > headers: { > "Content-Type": > "application/x-www-form-urlencoded;charset=utf-8", >-- >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 36700
:
165537
|
165618
|
165715
|
165716
|
165744
|
165745
|
165962
|
165963
|
165964