From a996fc4abef3a02a7299a92dbcbdd6425b160af7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 16 May 2016 19:51:07 +0200 Subject: Add check for the author username length --- server/helpers/customValidators.js | 1 + 1 file changed, 1 insertion(+) (limited to 'server/helpers/customValidators.js') 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) { !isNaN(val.duration) && val.duration >= 0 && val.duration < constants.MAXIMUM_VIDEO_DURATION && + validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) && validator.isDate(val.createdDate) }) } -- cgit v1.2.3