Bugzilla – Attachment 165963 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.50 KB, created by
Martin Renvoize (ashimema)
on 2024-05-01 12:34:14 UTC
(
hide
)
Description:
Bug 36700: Update svc to use CSRF-TOKEN
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-01 12:34:14 UTC
Size:
1.50 KB
patch
obsolete
>From 22d5926b13fe2b33dca4c88bc3b159d741f88c27 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 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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.44.0
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