From e2c354878fdef4f00a51f4ff3f4721aec6f7244e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 May 2024 08:36:35 +0200 Subject: [PATCH] Fix "reading 'isBlacklisted' of undefined" --- server/core/middlewares/validators/redundancy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/middlewares/validators/redundancy.ts b/server/core/middlewares/validators/redundancy.ts index ea9c7439e..eac61bf44 100644 --- a/server/core/middlewares/validators/redundancy.ts +++ b/server/core/middlewares/validators/redundancy.ts @@ -74,9 +74,9 @@ const videoPlaylistRedundancyGetValidator = [ async (req: express.Request, res: express.Response, next: express.NextFunction) => { if (areValidationErrors(req, res)) return if (!await doesVideoExist(req.params.videoId, res)) return - if (!canVideoBeFederated(res.locals.onlyVideo)) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) const video = res.locals.videoAll + if (!canVideoBeFederated(video)) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) const paramPlaylistType = req.params.streamingPlaylistType as unknown as number // We casted to int above const videoStreamingPlaylist = video.VideoStreamingPlaylists.find(p => p.type === paramPlaylistType)