aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-23 17:18:18 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:41 +0100
commiteebd9838f067369031af9770b899f75f30810549 (patch)
treeb7ce9668e6a653a097b6790ac944eaa1d78d2032 /server/middlewares/validators
parent4bc45da342597fb49593fc14c40f8dc5a97bb64e (diff)
downloadPeerTube-eebd9838f067369031af9770b899f75f30810549.tar.gz
PeerTube-eebd9838f067369031af9770b899f75f30810549.tar.zst
PeerTube-eebd9838f067369031af9770b899f75f30810549.zip
Add filter hook to forbid embed access
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/videos/video-comments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts
index 226c9d436..1afacfed8 100644
--- a/server/middlewares/validators/videos/video-comments.ts
+++ b/server/middlewares/validators/videos/video-comments.ts
@@ -216,7 +216,7 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon
216 if (!acceptedResult || acceptedResult.accepted !== true) { 216 if (!acceptedResult || acceptedResult.accepted !== true) {
217 logger.info('Refused local comment.', { acceptedResult, acceptParameters }) 217 logger.info('Refused local comment.', { acceptedResult, acceptParameters })
218 res.status(HttpStatusCode.FORBIDDEN_403) 218 res.status(HttpStatusCode.FORBIDDEN_403)
219 .json({ error: acceptedResult.errorMessage || 'Refused local comment' }) 219 .json({ error: acceptedResult?.errorMessage || 'Refused local comment' })
220 220
221 return false 221 return false
222 } 222 }