]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mqtt: fix PUBLISH flags validation that want all bits to be set
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 13:38:58 +0000 (15:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 14:04:19 +0000 (16:04 +0200)
commitbe2851f304d3a147808108b53725718451944fd9
treecef41dac25ffbbe2cacb2f2c9534eec2483458b1
parente2ab156fa297f59bdde5b06c031b0f564b198973
BUG/MINOR: mqtt: fix PUBLISH flags validation that want all bits to be set

The definition of the PUBLISH message type indicates that the LSB are
independent, but uses a value of 0xF that clearly shows an attempt to
use a mask instead, but it results in all messages not having all flags
set to be rejected. A sane approach would have been to check for a mask
and an expected value. Let's just add a special case for it in function
mqtt_read_fixed_hdr() since that's for a single message type.

This can be backported anywhere.
src/mqtt.c