mbproxy: fix dashboard review findings, add named BCD tags + fleet config

Reviewed the new SignalR dashboard and fixed its two top findings: a stored XSS on the connection-detail page (unescaped tag name / direction / timestamp rendered into innerHTML) and FC03/FC04 cache hits bypassing the debug-view capture, which left cached tags frozen while their age climbed. Also adds an optional human-friendly Name to BCD tags surfaced on the debug view, and loads the real fleet config from tags.txt (12 named BCD tags, PLC Z28061) so the published appsettings.json is deploy-ready.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-05-16 03:39:39 -04:00
parent e719dd51c1
commit 554b05d28c
27 changed files with 964 additions and 83 deletions
@@ -45,6 +45,7 @@ public sealed class MbproxyOptionsBindingTests
{
["Mbproxy:BcdTags:Global:0:Address"] = "1072",
["Mbproxy:BcdTags:Global:0:Width"] = "16",
["Mbproxy:BcdTags:Global:0:Name"] = "Left AirSP",
["Mbproxy:BcdTags:Global:1:Address"] = "1080",
["Mbproxy:BcdTags:Global:1:Width"] = "32",
});
@@ -52,8 +53,10 @@ public sealed class MbproxyOptionsBindingTests
options.BcdTags.Global.Count.ShouldBe(2);
options.BcdTags.Global[0].Address.ShouldBe((ushort)1072);
options.BcdTags.Global[0].Width.ShouldBe((byte)16);
options.BcdTags.Global[0].Name.ShouldBe("Left AirSP");
options.BcdTags.Global[1].Address.ShouldBe((ushort)1080);
options.BcdTags.Global[1].Width.ShouldBe((byte)32);
options.BcdTags.Global[1].Name.ShouldBeNull("Name is optional — an omitted entry binds to null");
}
// -------------------------------------------------------------------------