From 8a5ad1563d8ea0e1e4af7626aa3f322442e060f1 Mon Sep 17 00:00:00 2001 From: ijustw0rkhere <57189556+ijustw0rkhere@users.noreply.github.com> Date: Mon, 11 Nov 2024 05:58:25 -0500 Subject: [PATCH] adjust removemeshuser to allow for shorter user ids (#6520) --- meshuser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshuser.js b/meshuser.js index 660b4e46..1cf9165a 100644 --- a/meshuser.js +++ b/meshuser.js @@ -2418,7 +2418,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } try { - if (common.validateString(command.userid, 8, 1024) == false) { err = "Invalid userid"; } // Check userid + if (common.validateString(command.userid, 1, 1024) == false) { err = "Invalid userid"; } // Check userid if (common.validateString(command.meshid, 8, 134) == false) { err = "Invalid groupid"; } // Check meshid if (command.userid.indexOf('/') == -1) { command.userid = 'user/' + domain.id + '/' + command.userid; } if (command.userid == obj.user._id) { err = "Can't remove self"; } // Can't add of modify self