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

This commit is contained in:
ijustw0rkhere 2024-11-11 05:58:25 -05:00 committed by GitHub
parent 911d987a84
commit 8a5ad1563d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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