diff --git a/tests/test_windows_node_source.py b/tests/test_windows_node_source.py index 062af4b..fac19a4 100644 --- a/tests/test_windows_node_source.py +++ b/tests/test_windows_node_source.py @@ -371,6 +371,8 @@ class WindowsNodeSourceTests(unittest.TestCase): self.assertNotIn("IsValidOriginRequest", inbox) self.assertNotIn("IsValidPlot", inbox) self.assertIn('root.TryGetProperty("input_transfers"', inbox) + self.assertIn("transfers.GetArrayLength() > 16", inbox) + self.assertNotIn("transfers.GetArrayLength() is < 1 or > 16", inbox) self.assertIn('"input", key, filename', inbox) self.assertIn("FileOptions.WriteThrough", inbox) self.assertIn("stream.Flush(flushToDisk: true)", inbox) diff --git a/windows-node/Zcbot.WindowsNode/JobInboxStore.cs b/windows-node/Zcbot.WindowsNode/JobInboxStore.cs index 02d639f..539bfac 100644 --- a/windows-node/Zcbot.WindowsNode/JobInboxStore.cs +++ b/windows-node/Zcbot.WindowsNode/JobInboxStore.cs @@ -457,7 +457,7 @@ internal sealed class JobInboxStore(string jobsDirectory) private static bool IsValidInputTransfers(JsonElement transfers, Guid jobId) { if (transfers.ValueKind != JsonValueKind.Array - || transfers.GetArrayLength() is < 1 or > 16) + || transfers.GetArrayLength() > 16) { return false; }