Skip to content

Node.js based forum software built for the modern web

fix: restrict topic backfill to logged-in users when browsing to a category

Julian Lam0262bb83f33c
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index 74ec15c80f..55af0885f3 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -151,7 +151,7 @@ topicsController.get = async function getTopic(req, res, next) {
res.set('Link', `<${href}>; rel="alternate"; type="application/activity+json"`);
}
- if (!utils.isNumber(topicData.mainPid)) {
+ if (req.uid > 0 && !utils.isNumber(topicData.mainPid)) {
// not awaited on purpose so topic loading is not blocked
activitypub.notes.backfill(topicData.mainPid);
}