From 597330c949f9eabb8a0ce2ea7a46a2ff2cfdb81a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 5 Jan 2026 11:08:17 -0800 Subject: [PATCH] ioc: fix PUT to scalar mapping Mapping of eg. "X" needs update when "X.value" changes. Check for if any children of "X" are marked. Also send remote warning on attempt to write to unwritable field. --- ioc/groupsource.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ioc/groupsource.cpp b/ioc/groupsource.cpp index 105a42a..2a6d36d 100644 --- a/ioc/groupsource.cpp +++ b/ioc/groupsource.cpp @@ -498,17 +498,24 @@ static bool putGroupField(const Value& value, const Field& field, const SecurityClient& securityClient, - const GroupSecurityCache& groupSecurityCache) { + const GroupSecurityCache& groupSecurityCache, + server::RemoteLogger& notify) { // find the leaf node that the field refers to in the given value auto leafNode = field.findIn(value); - bool marked = leafNode.isMarked() && field.value && field.info.putOrder!=std::numeric_limits::min(); + bool putable = field.info.putOrder!=std::numeric_limits::min(); + bool marked = leafNode.isMarked(true, true) && field.value; + bool changing = marked && putable; + + if(marked && !putable) { + notify.logRemote(Level::Warn, SB()<& putOpe // Put the field didSomething |= putGroupField(value, field, groupSecurityCache.securityClients[fieldIndex], - groupSecurityCache); + groupSecurityCache, + *putOperation); fieldIndex++; } @@ -587,7 +595,8 @@ void GroupSource::putGroup(Group& group, std::unique_ptr& putOpe // Put the field didSomething |= putGroupField(value, field, groupSecurityCache.securityClients[fieldIndex], - groupSecurityCache); + groupSecurityCache, + *putOperation); fieldIndex++; // Unlock this field when locker goes out of scope }