aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-16 19:55:32 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-16 19:55:32 +0200
commit479f229198bdfcfd3a63d02babdddaa8b2209ccb (patch)
treeb9963adb7bbc3dc34aaaf99eba6370179401cfe8
parenta996fc4abef3a02a7299a92dbcbdd6425b160af7 (diff)
downloadPeerTube-479f229198bdfcfd3a63d02babdddaa8b2209ccb.tar.gz
PeerTube-479f229198bdfcfd3a63d02babdddaa8b2209ccb.tar.zst
PeerTube-479f229198bdfcfd3a63d02babdddaa8b2209ccb.zip
Add check for the thumbnail in base64 (requests inter pods)
-rw-r--r--server/helpers/customValidators.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/customValidators.js b/server/helpers/customValidators.js
index b95e2b9bb..5a0e70ffc 100644
--- a/server/helpers/customValidators.js
+++ b/server/helpers/customValidators.js
@@ -20,6 +20,8 @@ function eachIsRemoteVideosAddValid (values) {
20 val.duration >= 0 && 20 val.duration >= 0 &&
21 val.duration < constants.MAXIMUM_VIDEO_DURATION && 21 val.duration < constants.MAXIMUM_VIDEO_DURATION &&
22 validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) && 22 validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) &&
23 validator.isBase64(val.thumbnailBase64) &&
24 validator.isByteLength(val.thumbnailBase64, { min: 0, max: 20000 }) &&
23 validator.isDate(val.createdDate) 25 validator.isDate(val.createdDate)
24 }) 26 })
25} 27}