aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/feeds.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-21 09:01:39 +0200
committerChocobozzz <me@florianbigard.com>2020-04-21 09:01:39 +0200
commit68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a (patch)
tree81fa180f180f2cc3a2a7ec665a568acc8df3ce57 /server/controllers/feeds.ts
parentb3af2601da92a6c0835cb2473b4c7a41a0d86e98 (diff)
downloadPeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.tar.gz
PeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.tar.zst
PeerTube-68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a.zip
Don't leak unlisted videos in comments feed
Diffstat (limited to 'server/controllers/feeds.ts')
-rw-r--r--server/controllers/feeds.ts4
1 files changed, 2 insertions, 2 deletions
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
67 const feed = initFeed(name, description) 67 const feed = initFeed(name, description)
68 68
69 // Adding video items to the feed, one at a time 69 // Adding video items to the feed, one at a time
70 comments.forEach(comment => { 70 for (const comment of comments) {
71 const link = WEBSERVER.URL + comment.getCommentStaticPath() 71 const link = WEBSERVER.URL + comment.getCommentStaticPath()
72 72
73 let title = comment.Video.name 73 let title = comment.Video.name
@@ -89,7 +89,7 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res
89 author, 89 author,
90 date: comment.createdAt 90 date: comment.createdAt
91 }) 91 })
92 }) 92 }
93 93
94 // Now the feed generation is done, let's send it! 94 // Now the feed generation is done, let's send it!
95 return sendFeed(feed, req, res) 95 return sendFeed(feed, req, res)