Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/mqtt protocol #1410

Merged
merged 3 commits into from
Jul 9, 2018
Merged

Fix/mqtt protocol #1410

merged 3 commits into from
Jul 9, 2018

Conversation

frankdownunder
Copy link
Contributor

We allow a URL of the form "mqtts://user:password@server:port"
but we (currently) never check the protocol bit

@@ -77,6 +77,10 @@ bool MqttClient::setWill(const String& topic, const String& message, int QoS, bo
bool MqttClient::connect(const URL& url, const String& clientName, uint32_t sslOptions)
{
this->url = url;
if (not (url.Protocol == "mqtt" || url.Protocol == "mqtts")) {
debug_e("Invalid protocol");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frankdownunder Maybe the error message should be a bit more descriptive and explain that only mqtt and mqtts protocols are allowed.

@slaff slaff added this to the 3.6.1 milestone Jul 9, 2018
@slaff slaff merged commit ade49d3 into SmingHub:develop Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants