Skip to content

PUBLISH decode accepts DUP=1 with QoS 0 (spec violation, currently tolerated by design) #10

Description

@sidick

Flagged in the pre-release review; currently a deliberate design choice (tolerant receiver), not fixed. Filing so the tradeoff is visible and revisitable.

MQTT 3.1.1 (MQTT-3.3.1-2) requires DUP to be 0 for QoS 0 messages. src/core/mqtt_packet.c's PUBLISH decode does not reject DUP=1 with QoS 0 — a malformed/misbehaving broker or MITM packet (0x38, PUBLISH DUP=1 QoS0) is currently accepted and surfaced to the callback as-is.

Decide deliberately: keep the tolerant-receiver posture (document it in docs/PROTOCOL.md's coverage notes), or reject with -MQTT_ERR_MALFORMED like the empty-topic-name fix already applied for MQTT-4.7.3-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedtech-debtDeliberately deferred fix or design tradeoff from a past review

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions