buglwIP - A Lightweight TCP/IP stack - Bugs: bug #54655, MQTT restricts password to be less...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #54655: MQTT restricts password to be less than 256 bytes

Submitter:  Richmond Umagat <richmond_umagat>
Submitted:  Thu 13 Sep 2018 07:27:21 AM UTC
   
 
Category:  apps Severity:  3 - Normal
Item Group:  Feature Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  git head

Thu 13 Sep 2018 12:58:48 PM UTC, comment #1: 

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 13 Sep 2018 07:27:21 AM UTC, original submission:  

MQTT brokers such as Google Cloud IoT Core requires MQTT clients to send JSON Web Token (JWT) as password field of the MQTT Connect packet. JWT can be more than 255 bytes.

Currently, the MQTT library restricts password to be less than 256 bytes, thus it prevents connectivity to Google Cloud IoT Core.

To fix the issue, mqtt_client_connect() must be updated as follows:
- Change client_pass_len from u8 to u16
- Update error checking length of client_info->client_pass from 255 to X
- Also, MQTT_OUTPUT_RINGBUF_SIZE has been changed from 256 to 768.
Modifications are enclosed in FT32_PORT.

Attached are the proposed modifications tested to connect to Google Cloud IoT Core.

Richmond Umagat <richmond_umagat>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #44996:  mqtt.c added by richmond_umagat (49KiB - text/plain - Proposed changes)
file #44997:  mqtt_opts.h added by richmond_umagat (3KiB - text/plain - Proposed changes)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by richmond_umagat (Submitted the item)
  • -email is unavailable- added by richmond_umagat (Submit MQTT password bug with proposed solution)
  • -email is unavailable- added by richmond_umagat (Submit MQTT password bug with proposed solution)
  • -email is unavailable- added by richmond_umagat (Submit MQTT password bug with proposed solution)
  • -email is unavailable- added by richmond_umagat (Submit MQTT password bug with proposed solution)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-13 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.1.0
    2018-09-13 richmond_umagat Attached File- Added mqtt.c, #44996
        Attached File- Added mqtt_opts.h, #44997
    2018-09-13 richmond_umagat Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code