aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-16 19:51:07 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-16 19:51:07 +0200
commita996fc4abef3a02a7299a92dbcbdd6425b160af7 (patch)
tree13476e40a580ec39d818d87b53feb1d2dfba1a27 /server/helpers
parent67100f1f971dd10a466a321899b56c0813e08d31 (diff)
downloadPeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.tar.gz
PeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.tar.zst
PeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.zip
Add check for the author username length
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/customValidators.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/customValidators.js b/server/helpers/customValidators.js
index 9b982369e..b95e2b9bb 100644
--- a/server/helpers/customValidators.js
+++ b/server/helpers/customValidators.js
@@ -19,6 +19,7 @@ function eachIsRemoteVideosAddValid (values) {
19 !isNaN(val.duration) && 19 !isNaN(val.duration) &&
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.isDate(val.createdDate) 23 validator.isDate(val.createdDate)
23 }) 24 })
24} 25}