Node.js based forum software built for the modern web
check for invalid topic
barisusakli5ff5a01c4f97
diff --git a/src/privileges/posts.js b/src/privileges/posts.jsindex 6096c1f552..6270b6e99e 100644--- a/src/privileges/posts.js+++ b/src/privileges/posts.js@@ -112,7 +112,7 @@ module.exports = function(privileges) {pids = postData.filter(function(post) {- return cids.indexOf(post.topic.cid) !== -1 &&+ return post.topic && cids.indexOf(post.topic.cid) !== -1 &&((parseInt(post.topic.deleted, 10) !== 1 && parseInt(post.deleted, 10) !== 1) || results.isAdmin || isModOf[post.cid]);}).map(function(post) {return post.pid;