diff --git a/ChangeLog.txt b/ChangeLog.txt index 7785799e..3764ebfd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -36,6 +36,8 @@ Broker: - Windows: Fix possible crash when client disconnects. Closes #1137. - Fixed durable clients being unable to receive messages when offline, when per_listener_settings was set to true. Closes #1081. +- Add log message for the case where a client is disconnected for sending a + topic with invalid UTF-8. Closes #1144. Library: - Fix TLS connections not working over SOCKS. diff --git a/src/handle_publish.c b/src/handle_publish.c index 76b3ee89..2402869b 100644 --- a/src/handle_publish.c +++ b/src/handle_publish.c @@ -70,6 +70,7 @@ int handle__publish(struct mosquitto_db *db, struct mosquitto *context) } if(mosquitto_validate_utf8(topic, slen) != MOSQ_ERR_SUCCESS){ + log__printf(NULL, MOSQ_LOG_INFO, "Client %s sent topic with invalid UTF-8, disconnecting.", context->id); mosquitto__free(topic); return 1; }