Bugzilla – Attachment 165715 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: Update svc to use CSRF-TOKEN
Bug-36700-Update-svc-to-use-CSRF-TOKEN.patch (text/plain), 1.38 KB, created by
David Cook
on 2024-04-29 01:23:40 UTC
(
hide
)
Description:
Bug 36700: Update svc to use CSRF-TOKEN
Filename:
MIME Type:
Creator:
David Cook
Created:
2024-04-29 01:23:40 UTC
Size:
1.38 KB
patch
obsolete
>From 11f941683de01dadc5b431d90be6b9419e00e971 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 29 Apr 2024 01:23:17 +0000 >Subject: [PATCH] Bug 36700: Update svc to use CSRF-TOKEN > >--- > misc/migration_tools/koha-svc.pl | 2 +- > svc/authentication | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/migration_tools/koha-svc.pl b/misc/migration_tools/koha-svc.pl >index 1b749d9559a..125b79ab433 100755 >--- a/misc/migration_tools/koha-svc.pl >+++ b/misc/migration_tools/koha-svc.pl >@@ -106,7 +106,7 @@ sub new { > $ua->cookie_jar({}); > > my $get_resp = $ua->get("$url/authentication"); >- my $csrf_token = $get_resp->header('X-CSRF-TOKEN'); >+ my $csrf_token = $get_resp->header('CSRF-TOKEN'); > $self->{csrf_token} = $csrf_token; > > my $resp = $ua->post( >diff --git a/svc/authentication b/svc/authentication >index 6d8fc571ac5..29d05206a57 100755 >--- a/svc/authentication >+++ b/svc/authentication >@@ -62,5 +62,5 @@ if ( $status eq "ok" ) { > ); > $csrf_token = Koha::Token->new->generate_csrf( { session_id => scalar $sessionID } ); > } >-print $query->header( -type => 'text/xml', cookie => $cookie, -'X-CSRF-TOKEN' => $csrf_token ); >+print $query->header( -type => 'text/xml', cookie => $cookie, -'CSRF-TOKEN' => $csrf_token ); > print XMLout( { status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1 ); >-- >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