256dpi / lwmqtt

a light weight MQTT implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

empty usernames are not encoded correctly

dustin opened this issue · comments

In generating connect requests, I found that intentionally specifying an empty string as a username is interpreted as no username, so the field is omitted altogether.

AFAICT, an empty username is valid, but is required if you want to specify a password without a username.

I'm not sure how much this actually matters, but it's a test failure I'm working around currently.

There's a similar issue with passwords. For the purposes of my tests, I've just converted "" to Nothing in both cases to get all the tests passing.

Fixed in ebf53c0. Will be available in next release.