mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Second fix for mesh link escaping.
This commit is contained in:
parent
e879e44713
commit
333c7c7876
5
db.js
5
db.js
@ -108,6 +108,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
// Add this as a valid user identifier
|
||||
validIdentifiers[docs[i]._id] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Fix all of the creating & login to ticks by seconds, not milliseconds.
|
||||
obj.GetAllType('user', function (err, docs) {
|
||||
@ -171,7 +172,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
var xid = j, xid2 = common.unEscapeFieldName(xid);
|
||||
while ((xid != xid2) && (validIdentifiers[xid2] == null)) { xid = xid2; xid2 = common.unEscapeFieldName(xid2); }
|
||||
if (validIdentifiers[xid2] == 1) {
|
||||
//console.log('Fixing id: ' + j + ' to ' + common.escapeFieldName(xid2));
|
||||
//console.log('Fixing id: ' + j + ' to ' + xid2);
|
||||
docs[i].links[xid2] = docs[i].links[j];
|
||||
delete docs[i].links[j];
|
||||
meshChange = true;
|
||||
@ -204,9 +205,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// Get encryption key
|
||||
|
@ -2765,8 +2765,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
}
|
||||
case 'createmesh':
|
||||
{
|
||||
console.log(command);
|
||||
|
||||
var err = null;
|
||||
try {
|
||||
// Check if we have new group restriction
|
||||
|
Loading…
Reference in New Issue
Block a user