diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-22 17:04:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-22 17:11:31 +0200 |
commit | 83002a823465fe03a8d82833cb2e073a383405a8 (patch) | |
tree | 1b28e2d98c192b1be513cc448be301360f33c8ad /server/helpers/custom-validators | |
parent | 57c318653e6a8ae9d0c2541a62853fb8dd582d5d (diff) | |
download | PeerTube-83002a823465fe03a8d82833cb2e073a383405a8.tar.gz PeerTube-83002a823465fe03a8d82833cb2e073a383405a8.tar.zst PeerTube-83002a823465fe03a8d82833cb2e073a383405a8.zip |
Update server dependencies
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/videos.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index 9e8177f77..5f75ec27c 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { UploadFilesForCheck } from 'express' | 1 | import { UploadFilesForCheck } from 'express' |
2 | import magnetUtil from 'magnet-uri' | 2 | import { decode as magnetUriDecode } from 'magnet-uri' |
3 | import validator from 'validator' | 3 | import validator from 'validator' |
4 | import { VideoFilter, VideoInclude, VideoPrivacy, VideoRateType } from '@shared/models' | 4 | import { VideoFilter, VideoInclude, VideoPrivacy, VideoRateType } from '@shared/models' |
5 | import { | 5 | import { |
@@ -137,7 +137,7 @@ function isVideoFileSizeValid (value: string) { | |||
137 | function isVideoMagnetUriValid (value: string) { | 137 | function isVideoMagnetUriValid (value: string) { |
138 | if (!exists(value)) return false | 138 | if (!exists(value)) return false |
139 | 139 | ||
140 | const parsed = magnetUtil.decode(value) | 140 | const parsed = magnetUriDecode(value) |
141 | return parsed && isVideoFileInfoHashValid(parsed.infoHash) | 141 | return parsed && isVideoFileInfoHashValid(parsed.infoHash) |
142 | } | 142 | } |
143 | 143 | ||