diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 3a1a905f3..b3ffb7007 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -102,22 +102,6 @@ const videosAddLegacyValidator = getCommonVideoEditAttributes().concat([ | |||
102 | } | 102 | } |
103 | ]) | 103 | ]) |
104 | 104 | ||
105 | const videosResumableUploadIdValidator = [ | ||
106 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | ||
107 | const user = res.locals.oauth.token.User | ||
108 | const uploadId = req.query.upload_id | ||
109 | |||
110 | if (uploadId.startsWith(user.id + '-') !== true) { | ||
111 | return res.fail({ | ||
112 | status: HttpStatusCode.FORBIDDEN_403, | ||
113 | message: 'You cannot send chunks in another user upload' | ||
114 | }) | ||
115 | } | ||
116 | |||
117 | return next() | ||
118 | } | ||
119 | ] | ||
120 | |||
121 | /** | 105 | /** |
122 | * Gets called after the last PUT request | 106 | * Gets called after the last PUT request |
123 | */ | 107 | */ |
@@ -566,7 +550,6 @@ export { | |||
566 | videosAddLegacyValidator, | 550 | videosAddLegacyValidator, |
567 | videosAddResumableValidator, | 551 | videosAddResumableValidator, |
568 | videosAddResumableInitValidator, | 552 | videosAddResumableInitValidator, |
569 | videosResumableUploadIdValidator, | ||
570 | 553 | ||
571 | videosUpdateValidator, | 554 | videosUpdateValidator, |
572 | videosGetValidator, | 555 | videosGetValidator, |