Follow-up from #1117 review. aedes currently degrades silently when a CONNECT repeats a v5 property that must appear at most once; #1117 closes the one wire-reachable crash (outbound Topic Alias Maximum) defensively, but the general class is worth a deliberate, separate change.
Scope (per the #1117 discussion)
- Base-branch behaviour change.
receiveMaximum and maximumPacketSize already ship on mqttv5 accepting the array shape and degrading silently; making duplicates strict (0x82 Protocol Error, connection refused) changes CONNECTs that currently succeed. That deserves its own commit / bisect point, not a fold-in.
- Per-property spec basis. "It is a Protocol Error to include X more than once" recurs for each property, so the right shape is a general CONNECT-property validation pass, not three special cases.
- The array shape is not a reliable duplicate signal. mqtt-packet promotes a repeated property to an array behind a truthiness check (
parser.js:772), so a duplicate whose first occurrence is 0 is silently overwritten rather than arrayed. Detecting duplicates properly likely needs an upstream mqtt-packet change.
Notes
Follow-up from #1117 review. aedes currently degrades silently when a CONNECT repeats a v5 property that must appear at most once; #1117 closes the one wire-reachable crash (outbound Topic Alias Maximum) defensively, but the general class is worth a deliberate, separate change.
Scope (per the #1117 discussion)
receiveMaximumandmaximumPacketSizealready ship onmqttv5accepting the array shape and degrading silently; making duplicates strict (0x82Protocol Error, connection refused) changes CONNECTs that currently succeed. That deserves its own commit / bisect point, not a fold-in.parser.js:772), so a duplicate whose first occurrence is0is silently overwritten rather than arrayed. Detecting duplicates properly likely needs an upstream mqtt-packet change.Notes
> 0guard), so this can land independently, whenever.