Commit 273fc26d70e197e59e96a23a084068c94c6f0380

Authored by Wiebe Cazemier
1 parent 5a2f52b7

Check reponse topic for invalid characters

Showing 1 changed file with 2 additions and 2 deletions
mqttpacket.cpp
... ... @@ -488,7 +488,7 @@ void MqttPacket::handleConnect()
488 488 }
489 489 case Mqtt5Properties::ResponseTopic:
490 490 {
491   - const std::string responseTopic = readBytesToString();
  491 + const std::string responseTopic = readBytesToString(true, true);
492 492 willpublish.propertyBuilder->writeResponseTopic(responseTopic);
493 493 break;
494 494 }
... ... @@ -1070,7 +1070,7 @@ void MqttPacket::parsePublishData()
1070 1070 case Mqtt5Properties::ResponseTopic:
1071 1071 {
1072 1072 publishData.constructPropertyBuilder();
1073   - const std::string responseTopic = readBytesToString();
  1073 + const std::string responseTopic = readBytesToString(true, true);
1074 1074 publishData.propertyBuilder->writeResponseTopic(responseTopic);
1075 1075 break;
1076 1076 }
... ...