From 68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 21 Apr 2020 09:01:39 +0200 Subject: Don't leak unlisted videos in comments feed --- server/controllers/feeds.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/feeds.ts') diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index 72628dffb..cb82bfc6d 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts @@ -67,7 +67,7 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res const feed = initFeed(name, description) // Adding video items to the feed, one at a time - comments.forEach(comment => { + for (const comment of comments) { const link = WEBSERVER.URL + comment.getCommentStaticPath() let title = comment.Video.name @@ -89,7 +89,7 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res author, date: comment.createdAt }) - }) + } // Now the feed generation is done, let's send it! return sendFeed(feed, req, res) -- cgit v1.2.3