Skip to content

Node.js based forum software built for the modern web

Respond with 404 when topic inside hidden category

Raphael Beercf7b7a8d4c4d
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index aa3da51053..8cbd31014d 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -119,6 +119,10 @@ topicsController.get = function(req, res, callback) {
return next(err);
}
+ if (topicData.category.disabled) {
+ return callback();
+ }
+
topics.modifyByPrivilege(topicData.posts, results.privileges);
plugins.fireHook('filter:controllers.topic.get', topicData, next);