From eebd9838f067369031af9770b899f75f30810549 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Mar 2021 17:18:18 +0100 Subject: Add filter hook to forbid embed access --- server/middlewares/validators/videos/video-comments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares') 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 if (!acceptedResult || acceptedResult.accepted !== true) { logger.info('Refused local comment.', { acceptedResult, acceptParameters }) res.status(HttpStatusCode.FORBIDDEN_403) - .json({ error: acceptedResult.errorMessage || 'Refused local comment' }) + .json({ error: acceptedResult?.errorMessage || 'Refused local comment' }) return false } -- cgit v1.2.3