diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-23 17:18:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:41 +0100 |
commit | eebd9838f067369031af9770b899f75f30810549 (patch) | |
tree | b7ce9668e6a653a097b6790ac944eaa1d78d2032 /server/middlewares/validators | |
parent | 4bc45da342597fb49593fc14c40f8dc5a97bb64e (diff) | |
download | PeerTube-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.ts | 2 |
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 | } |