adjust removemeshuser to allow for shorter user ids (#6520)

ijustw0rkhere committed Nov 11, 2024 at 05:58 UTC 8a5ad1563d8ea0e1e4af7626aa3f322442e060f1
1 file changed +1 -1
meshuser.js
+1 -1
@@ -2418,7 +2418,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
2418 }
2419
2420 try {
2421 - if (common.validateString(command.userid, 8, 1024) == false) { err = "Invalid userid"; } // Check userid
2421 + if (common.validateString(command.userid, 1, 1024) == false) { err = "Invalid userid"; } // Check userid
2422 if (common.validateString(command.meshid, 8, 134) == false) { err = "Invalid groupid"; } // Check meshid
2423 if (command.userid.indexOf('/') == -1) { command.userid = 'user/' + domain.id + '/' + command.userid; }
2424 if (command.userid == obj.user._id) { err = "Can't remove self"; } // Can't add of modify self