Skip to content

Auto-port 4.1: MQTT: Allow MQTT 5 CONNECT with password only#16834

Merged
normanmaurer merged 2 commits into
4.1from
auto-port-pr-16833-to-4.1
May 21, 2026
Merged

Auto-port 4.1: MQTT: Allow MQTT 5 CONNECT with password only#16834
normanmaurer merged 2 commits into
4.1from
auto-port-pr-16833-to-4.1

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16833 to 4.1
Cherry-picked commit: 7125dba


Motivation:

MQTT 5 allows CONNECT messages to include a password without a user
name. MqttEncoder currently rejects this combination.

Modification:

Only reject password-only CONNECT messages for MQTT 3.1 and 3.1.1.
Add tests for MQTT 3.1, 3.1.1, and MQTT 5.

Result:

MQTT 5 password-only CONNECT messages can be encoded.

Fixes #16828.

Motivation:

MQTT 5 allows CONNECT messages to include a password without a user
name. MqttEncoder currently rejects this combination.

Modification:

Only reject password-only CONNECT messages for MQTT 3.1 and 3.1.1.
Add tests for MQTT 3.1, 3.1.1, and MQTT 5.

Result:

MQTT 5 password-only CONNECT messages can be encoded.

Fixes #16828.

(cherry picked from commit 7125dba)
@normanmaurer normanmaurer added this to the 4.1.135.Final milestone May 21, 2026
@normanmaurer normanmaurer merged commit 4b7b834 into 4.1 May 21, 2026
18 checks passed
@normanmaurer normanmaurer deleted the auto-port-pr-16833-to-4.1 branch May 21, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants