From 451806c167508b17a756afb8954cf7c57ab5bdb1 Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 29 Apr 2024 01:36:02 +0000 Subject: [PATCH] Bug 36700: Fix CSRF-TOKEN header in image upload Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/js/upload-images.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/upload-images.js b/koha-tmpl/intranet-tmpl/prog/js/upload-images.js index b2349a55ef..c81a75d9d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/upload-images.js +++ b/koha-tmpl/intranet-tmpl/prog/js/upload-images.js @@ -124,7 +124,7 @@ function AjaxUpload ( formData, progressbar, xtra, callback ) { progressbar.val( 0 ); progressbar.next('.fileuploadpercent').text( '0' ); xhr.open('POST', url, true); - xhr.setRequestHeader("csrf_token", $('meta[name="csrf-token"]').attr("content")); + xhr.setRequestHeader("CSRF-TOKEN", $('meta[name="csrf-token"]').attr("content")); xhr.upload.onprogress = function (e) { var p = Math.round( (e.loaded/e.total) * 100 ); progressbar.val( p ); -- 2.39.5