summaryrefslogtreecommitdiff
path: root/src/api/endpoints
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints')
-rw-r--r--src/api/endpoints/i/update.js4
1 files changed, 4 insertions, 0 deletions
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');
}