projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a996fc4
)
Add check for the thumbnail in base64 (requests inter pods)
author
Chocobozzz
<florian.bigard@gmail.com>
Mon, 16 May 2016 17:55:32 +0000
(19:55 +0200)
committer
Chocobozzz
<florian.bigard@gmail.com>
Mon, 16 May 2016 17:55:32 +0000
(19:55 +0200)
server/helpers/customValidators.js
patch
|
blob
|
history
diff --git
a/server/helpers/customValidators.js
b/server/helpers/customValidators.js
index b95e2b9bb57a21ac036397615d0b0739ef7f3526..5a0e70ffc1df1f9c68561f0b6a96cdb31bd5e7c2 100644
(file)
--- 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)
})
}