The bug
On a dedicated server, when having permission level >= 2 and using chat commands such as /say
or /me
with messages containing entity selectors the message is often reported as "This message is not secure".
There seem to be some general flaws:
Unless
previews-chat=true
is enabled for the server and the client has enabled chat preview and the client waits long enough for the preview to be signed before sending the command, the message seems to be reported as "not secure"And even with the above preconditions, when the selector result differs between signed preview and sending of the command the message will be reported as "not secure". This can for example be seen with
@e
when the entities on the server change rapidly.
Reproduction steps
Start a dedicated server with
previews-chat=false
(the default)Join the server
Make sure you have a permission level >= 2 (e.g.
/op
yourself)Use the following command
/say @s
❌ In chat the message is marked as "This message is not secure"
Probably because entities can be named anything, and you're not exactly typing the message as it appears in chat history (which replaced the selector with entity names).
Seems pretty logical to me.