Log message for disconnecting a client with invalid UTF-8 topic.

Closes #1144. Thanks to Kris Mattheus.
pull/1600/head
Roger A. Light 7 years ago
parent d81b7e2b84
commit 50011b1842

@ -36,6 +36,8 @@ Broker:
- Windows: Fix possible crash when client disconnects. Closes #1137. - Windows: Fix possible crash when client disconnects. Closes #1137.
- Fixed durable clients being unable to receive messages when offline, when - Fixed durable clients being unable to receive messages when offline, when
per_listener_settings was set to true. Closes #1081. 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: Library:
- Fix TLS connections not working over SOCKS. - Fix TLS connections not working over SOCKS.

@ -70,6 +70,7 @@ int handle__publish(struct mosquitto_db *db, struct mosquitto *context)
} }
if(mosquitto_validate_utf8(topic, slen) != MOSQ_ERR_SUCCESS){ 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); mosquitto__free(topic);
return 1; return 1;
} }

Loading…
Cancel
Save