fix orphanagentuser toLowerCase() (#6317)

https://github.com/Ylianst/MeshCentral/issues/2095#issuecomment-2276360509
This commit is contained in:
Dmitry Kostenkov 2024-09-15 21:42:15 +05:00 committed by GitHub
parent 2f34b7e83b
commit 59a3a22ea5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -616,7 +616,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
} }
if ((mesh == null) && (typeof domain.orphanagentuser == 'string')) { if ((mesh == null) && (typeof domain.orphanagentuser == 'string')) {
const adminUser = parent.users['user/' + domain.id + '/' + domain.orphanagentuser.toLowerCase()]; const adminUser = parent.users['user/' + domain.id + '/' + domain.orphanagentuser];
if ((adminUser != null) && (adminUser.siteadmin == 0xFFFFFFFF)) { if ((adminUser != null) && (adminUser.siteadmin == 0xFFFFFFFF)) {
// Mesh name is hex instead of base64 // Mesh name is hex instead of base64
const meshname = obj.meshid.substring(0, 18); const meshname = obj.meshid.substring(0, 18);