Skip to content

Commit 133c859

Browse files
authored
Revert "MQTTv3.1 supports a zero-byte clientId during authentication (#900)" (#916)
This reverts commit adb5ec6.
1 parent adb5ec6 commit 133c859

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

broker/src/main/java/io/moquette/broker/MQTTConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ PostOffice.RouteResult processConnect(MqttConnectMessage msg) {
210210
final boolean cleanSession = msg.variableHeader().isCleanSession();
211211
final boolean serverGeneratedClientId;
212212
if (clientId == null || clientId.isEmpty()) {
213-
if (isNotProtocolVersion(msg, MqttVersion.MQTT_5) && isNotProtocolVersion(msg, MqttVersion.MQTT_3_1_1)) {
213+
if (isNotProtocolVersion(msg, MqttVersion.MQTT_5)) {
214214
if (!brokerConfig.isAllowZeroByteClientId()) {
215215
LOG.info("Broker doesn't permit MQTT empty client ID. Username: {}", username);
216216
abortConnection(CONNECTION_REFUSED_IDENTIFIER_REJECTED);

0 commit comments

Comments
 (0)