Bugzilla – Attachment 166638 Details for
Bug 36838
Can't approve or reject tags in the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36838: Add CSRF token to tags review AJAX requests
Bug-36838-Add-CSRF-token-to-tags-review-AJAX-reque.patch (text/plain), 1.94 KB, created by
Owen Leonard
on 2024-05-13 13:51:42 UTC
(
hide
)
Description:
Bug 36838: Add CSRF token to tags review AJAX requests
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-05-13 13:51:42 UTC
Size:
1.94 KB
patch
obsolete
>From b53c3488b5bdc5dd800bc4926029e8631479a1a5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 13 May 2024 13:46:03 +0000 >Subject: [PATCH] Bug 36838: Add CSRF token to tags review AJAX requests > >The JavaScript for approving or rejecting tags in the staff interface's >tag review interface lacked a CSRF token for the POSTed requests. This >patch adds the token for "approve" and "reject" operations. > >To test, apply the patch and clear your browser cache if necessary. > >- If necessary, enable tags in system preferences. >- Log in to the OPAC and submit multiple tags on various records. >- In the staff interface, go to Tools -> Tags. >- Test the process of approving and rejecting tags by clicking the > buttons in each row of the table of tags. >- The browser console should show no errors, and the lists of approved > and rejected tags should correctly show the tags you moderated. >--- > koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js b/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js >index 39a349f196..af4c719ec8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js >@@ -105,6 +105,7 @@ $(document).ready(function() { > data: { > tag: $(event.target).attr("title"), > op: 'cud-approve', >+ csrf_token: $('meta[name="csrf-token"]').attr('content') > }, > success: count_approve // success_approve > })); >@@ -127,6 +128,7 @@ $(document).ready(function() { > data: { > tag: $(event.target).attr("title"), > op: 'cud-reject', >+ csrf_token: $('meta[name="csrf-token"]').attr('content') > }, > success: count_reject // success_reject > })); >-- >2.39.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 36838
:
166638
|
166639