Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5058

Broker MUST respond with CONNACK with return code 0x02 for zero length client id and 0 cleansession

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.9.0
    • 5.10.0
    • MQTT
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. AMQ-5058.patch
          2 kB
          Dhiraj Sureshkumar Bokde

        Activity

          People

            Unassigned Unassigned
            dhirajsb Dhiraj Sureshkumar Bokde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: