This commit is contained in:
Stefan Kleeschulte
2024-11-26 02:59:47 +00:00
committed by GitHub

View File

@@ -250,6 +250,10 @@ module.exports = function(RED) {
} catch (e) {
node.error(RED._("mqtt.errors.invalid-json-parse"), { payload: payload, topic: topic, qos: packet.qos, retain: packet.retain }); return;
}
if (this.brokerurl.indexOf("mqtts://") > -1 && (!this.usetls || !n.tls)) {
// Default to validating the server cert
this.verifyservercert = true;
}
} else {
node.error((RED._("mqtt.errors.invalid-json-string")), { payload: payload, topic: topic, qos: packet.qos, retain: packet.retain }); return;
}