From b3a6919ea00f1b93c55ebf426755ee871c88be55 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Sun, 30 Apr 2017 19:32:52 +0200 Subject: [PATCH] Add support for complex device IDs. --- MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs b/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs index d7a39243e..61c6c8e1e 100644 --- a/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs +++ b/MQTTnet.Core/Serializer/DefaultMqttV311PacketSerializer.cs @@ -354,11 +354,6 @@ private void ValidateConnectPacket(MqttConnectPacket packet) { throw new MqttProtocolViolationException("CleanSession must be set if ClientId is empty [MQTT-3.1.3-7]."); } - - if (!string.IsNullOrEmpty(packet.ClientId) && !Regex.IsMatch(packet.ClientId, "^[a-zA-Z0-9]*$")) - { - throw new MqttProtocolViolationException("ClientId contains invalid characters [MQTT-3.1.3-5]."); - } } private void ValidatePublishPacket(MqttPublishPacket packet)