From: Chocobozzz Date: Mon, 16 May 2016 17:55:32 +0000 (+0200) Subject: Add check for the thumbnail in base64 (requests inter pods) X-Git-Tag: v0.0.1-alpha~919 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=479f229198bdfcfd3a63d02babdddaa8b2209ccb;p=oweals%2Fpeertube.git Add check for the thumbnail in base64 (requests inter pods) --- 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) { val.duration >= 0 && val.duration < constants.MAXIMUM_VIDEO_DURATION && validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) && + validator.isBase64(val.thumbnailBase64) && + validator.isByteLength(val.thumbnailBase64, { min: 0, max: 20000 }) && validator.isDate(val.createdDate) }) }