From 22d680d54c193dac38729e9244d53e1141ed4082 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 23 Feb 2024 09:07:23 +0100 Subject: [PATCH] Bug 36148: Fix header name Signed-off-by: Jonathan Druart --- Koha/Middleware/CSRF.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm index 2d4582f2c4..41fd1438c2 100644 --- a/Koha/Middleware/CSRF.pm +++ b/Koha/Middleware/CSRF.pm @@ -47,7 +47,7 @@ sub call { } elsif ( $stateful_methods{$request_method} ) { # Get the CSRF token from the param list or the header - my $csrf_token = $req->param('csrf_token') || $req->header('HTTP_CSRF_TOKEN'); + my $csrf_token = $req->param('csrf_token') || $req->header('CSRF_TOKEN'); if ( defined $req->param('op') && $original_op !~ m{^cud-} ) { $error = sprintf "Programming error - op '%s' must start with 'cud-' for %s", $original_op, -- 2.39.5