aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/shared
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/shared')
-rw-r--r--server/middlewares/validators/shared/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/shared/videos.ts b/server/middlewares/validators/shared/videos.ts
index c29751eca..ebbfc0a0a 100644
--- a/server/middlewares/validators/shared/videos.ts
+++ b/server/middlewares/validators/shared/videos.ts
@@ -111,7 +111,7 @@ async function checkCanSeeVideo (options: {
111}) { 111}) {
112 const { req, res, video, paramId } = options 112 const { req, res, video, paramId } = options
113 113
114 if (video.requiresAuth(paramId)) { 114 if (video.requiresAuth({ urlParamId: paramId, checkBlacklist: true })) {
115 return checkCanSeeAuthVideo(req, res, video) 115 return checkCanSeeAuthVideo(req, res, video)
116 } 116 }
117 117
@@ -174,13 +174,13 @@ async function checkCanAccessVideoStaticFiles (options: {
174 res: Response 174 res: Response
175 paramId: string 175 paramId: string
176}) { 176}) {
177 const { video, req, res, paramId } = options 177 const { video, req, res } = options
178 178
179 if (res.locals.oauth?.token.User) { 179 if (res.locals.oauth?.token.User) {
180 return checkCanSeeVideo(options) 180 return checkCanSeeVideo(options)
181 } 181 }
182 182
183 if (!video.requiresAuth(paramId)) return true 183 if (!video.hasPrivateStaticPath()) return true
184 184
185 const videoFileToken = req.query.videoFileToken 185 const videoFileToken = req.query.videoFileToken
186 if (!videoFileToken) { 186 if (!videoFileToken) {