From 18e624410d70eba31182fa301155fc22ff024d48 Mon Sep 17 00:00:00 2001 From: Martin Schaef Date: Mon, 8 Nov 2021 13:35:15 -0500 Subject: [PATCH] Update client.py --- .../AWSIoTPythonSDK/core/protocol/paho/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py b/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py index 503d1c6..f7c0301 100755 --- a/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py +++ b/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py @@ -1710,7 +1710,7 @@ def _topic_wildcard_len_check(self, topic): # Search for + or # in a topic. Return MQTT_ERR_INVAL if found. # Also returns MQTT_ERR_INVAL if the topic string is too long. # Returns MQTT_ERR_SUCCESS if everything is fine. - if '+' in topic or '#' in topic or len(topic) == 0 or len(topic) > 65535: + if not topic or '+' in topic or '#' in topic or len(topic) > 65535: return MQTT_ERR_INVAL else: return MQTT_ERR_SUCCESS