Fixed comment voting.
This commit is contained in:
parent
294380d7bc
commit
e5335e5274
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ if ($isXHR) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tmp_csrf_verify($_REQUEST['csrf'] ?? '')) {
|
if (!tmp_csrf_verify($_REQUEST['csrf'] ?? '')) {
|
||||||
echo render_info_or_json("Couldn't verify this request, please refresh the page and try again.", 403);
|
echo render_info_or_json($isXHR, "Couldn't verify this request, please refresh the page and try again.", 403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -566,7 +566,7 @@
|
||||||
|
|
||||||
commentVoteLock = false;
|
commentVoteLock = false;
|
||||||
};
|
};
|
||||||
xhr.open('GET', '/comments.php?m=vote&c={0}&v={1}&h={{ csrf_token() }}'.replace('{0}', id).replace('{1}', vote));
|
xhr.open('GET', '/comments.php?m=vote&c={0}&v={1}&csrf={{ csrf_token() }}'.replace('{0}', id).replace('{1}', vote));
|
||||||
xhr.setRequestHeader('X-Misuzu-XHR', 'comments');
|
xhr.setRequestHeader('X-Misuzu-XHR', 'comments');
|
||||||
xhr.send();
|
xhr.send();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue