fix clonesafenode in dbNodeChange #5591

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2024-09-05 15:39:45 +01:00
parent 7c79dbcda1
commit ad1d82152a
1 changed files with 1 additions and 0 deletions

1
db.js
View File

@ -3845,6 +3845,7 @@ module.exports.CreateDB = function (parent, func) {
// Called when a node has changed
function dbNodeChange(nodeChange, added) {
if (parent.webserver == null) return;
common.unEscapeLinksFieldName(nodeChange.fullDocument);
const node = performTypedRecordDecrypt([nodeChange.fullDocument])[0];
parent.DispatchEvent(['*', node.meshid], obj, { etype: 'node', action: (added ? 'addnode' : 'changenode'), node: parent.webserver.CloneSafeNode(node), nodeid: node._id, domain: node.domain, nolog: 1 });