From 93c3faf141c1927a390b2e22169cad90a6a628ed Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 1 Mar 2017 20:38:27 +0900 Subject: [API] Fix bug and change limit 50 to 30 --- src/api/endpoints/i/update.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/endpoints/i') diff --git a/src/api/endpoints/i/update.js b/src/api/endpoints/i/update.js index 4b4d1743da..4abb4fcb7b 100644 --- a/src/api/endpoints/i/update.js +++ b/src/api/endpoints/i/update.js @@ -25,6 +25,10 @@ module.exports = async (params, user, _, isSecure) => // Get 'name' parameter const name = params.name; if (name !== undefined && name !== null) { + if (typeof name != 'string') { + return rej('name must be a string'); + } + if (!isValidName(name)) { return rej('invalid name'); } -- cgit v1.2.3-freya