[ 
https://issues.apache.org/jira/browse/AMQ-5058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-5058.
-------------------------------

    Resolution: Fixed

applied on trunk

> Broker MUST respond with CONNACK with return code 0x02 for zero length client 
> id and 0 cleansession
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-5058
>                 URL: https://issues.apache.org/jira/browse/AMQ-5058
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 5.9.0
>            Reporter: Dhiraj Bokde
>             Fix For: 5.10.0
>
>         Attachments: AMQ-5058.patch
>
>
> The CONNECT.decode() method from mqtt-client had an issue which has been 
> fixed in https://github.com/fusesource/mqtt-client/pull/31
> Wit this fix MQTTProtocolConverter.onConnect() can now check for the 
> condition outlined below and return a CONNACK with return code 0x02. 
> From MQTT 3.1.1 draft specification
> [MQTT-3.1.3-6] A Server MAY allow a Client to supply a ClientId that has a 
> length of zero bytes.
> However if it does so the Server MUST treat this as a special case and assign 
> a
> unique ClientId to that Client. It MUST then process the CONNECT packet as if
> the Client had provided that unique ClientId.
> [MQTT-3.1.3-7] If the Client supplies a zero-byte ClientId, the Client MUST 
> also set Clean
> Session to 1.
> [MQTT-3.1.3-8] If the Client supplies a zero-byte ClientId with Clean Session 
> set to 0, the Server
> MUST respond to the CONNECT Packet with a CONNACK return code 0x02
> (Identifier rejected) and then close the Network Connection.
> [MQTT-3.1.3-9] If the Server rejects the ClientId it MUST respond to the 
> CONNECT Packet with
> a CONNACK return code 0x02 (Identifier rejected) and then close the Network
> Connection.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to