aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-18 09:29:46 +0100
committerChocobozzz <me@florianbigard.com>2022-01-18 10:47:26 +0100
commit2f0a0ae21789ada8429c91a253288f738857a19b (patch)
treeea6bb708b3a65723b8fbf2d438cc6be88205b033 /server/middlewares/validators
parent743dab5517d4501f6b35cfc795de6c8b6f41ebb3 (diff)
downloadPeerTube-2f0a0ae21789ada8429c91a253288f738857a19b.tar.gz
PeerTube-2f0a0ae21789ada8429c91a253288f738857a19b.tar.zst
PeerTube-2f0a0ae21789ada8429c91a253288f738857a19b.zip
Upgrade uploadx dependency
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/videos/videos.ts17
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
105const 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,