From 9dcac6dfe926276caa92a6dacff521bf94da4fc8 Mon Sep 17 00:00:00 2001 From: David Cook 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 Signed-off-by: Martin Renvoize --- 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 1b749d9559..125b79ab43 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 6d8fc571ac..29d05206a5 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.39.5