Don't leak unlisted videos in comments feed

This commit is contained in:
Chocobozzz 2020-04-21 09:01:39 +02:00
parent b3af2601da
commit 68b6fd21b1
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 18 additions and 4 deletions

View file

@ -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)