Fixed comment voting.

This commit is contained in:
flash 2018-08-12 14:55:51 +02:00
parent 294380d7bc
commit e5335e5274
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ if ($isXHR) {
}
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;
}

View file

@ -566,7 +566,7 @@
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.send();
}