Skip to content

Commit 6106bde

Browse files
fix: add CSRF token to read/unread toggle AJAX request
Resolves CSRF validation error when toggling read status from overview page. The detail page was working correctly because it included the token via form serialization, but the overview page implementation was missing it.
1 parent a9e5ac4 commit 6106bde

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Copyright (C) 2024-2026 Calibre-Web Automated contributors
312312
- zhiyue (1 commits)
313313
# Fork Contributors (crocodilestick/calibre-web-automated)
314314

315-
- crocodilestick (900 commits)
315+
- crocodilestick (909 commits)
316316
- jmarmstrong1207 (73 commits)
317317
- demitrix (30 commits)
318318
- sirwolfgang (29 commits)

cps/static/js/caliBlur.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,9 @@ $(function() {
10601060
$.ajax({
10611061
url: window.scriptRoot + '/ajax/toggleread/' + bookId,
10621062
type: 'POST',
1063+
data: {
1064+
csrf_token: $("input[name='csrf_token']").val()
1065+
},
10631066
headers: {
10641067
'X-Requested-With': 'XMLHttpRequest'
10651068
},

0 commit comments

Comments
 (0)