Closed gbrehmer closed 2 days ago
Ah probably "strict_mode" (https://docs.emqx.com/en/emqx/v5.8.1/hocon/#V-mqtt-S-mqtt-strict_mode) is the property i'm searching for. I have to check this
This should work as required, I checked the code for strict mode handling:
What would you like to be added or enhanced?
Currently it is possible to use control characters in topic names. It should be possible to block such characters via configuration or block such characters in general. In MQTT 3.1.1 spec 1.5.3 it is stated like this (no MUST NOT but SHOULD NOT):
Why is this needed?
In combination with paho mqtt java client lib this can cause bigger problems. In our case the control characters were accidentally used in retained messages. So everytime a backend client with a wildcard subscription will receive this faulty message topic and then stopped working. Reconnect is working yes, but in the mean time it will miss a lot of messages and faulty retained message is coming back after reconnection = same behavior in a loop. We also receive a 400 Bad request vom Dashboard API when we try to cleanup the faulty retained message,