diff --git a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java index b83dd278c0..5998938233 100644 --- a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java +++ b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTProtocolConverter.java @@ -376,6 +376,9 @@ public class MQTTProtocolConverter { public void onUnSubscribe(UNSUBSCRIBE command) throws MQTTProtocolException { checkConnected(); + if (command.qos() != QoS.AT_LEAST_ONCE && (version != V3_1 || publishDollarTopics != true)) { + throw new MQTTProtocolException("Failed to process unsubscribe request", true, new Exception("UNSUBSCRIBE frame not properly formatted, QoS")); + } UTF8Buffer[] topics = command.topics(); if (topics != null) { for (UTF8Buffer topic : topics) { diff --git a/pom.xml b/pom.xml index b3d401577a..658b6d0214 100755 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ 1.8 1.2.17 1.10.17 - 1.10 + 1.12 1.2.0 10.11.1.1 4.3.1