mojira.dev
MC-233228

Text Filtering Config Doesn't Work in 21w20a and later

1.16.4 Pre-release 1 added a feature called "text-filtering-config" to server.properties which allowed the server to filter text written by players in chat and in written books.

This was an unfinished feature, but with the help of Walshy and his blog post, I found a way to use this feature to filter chat on my 1.17.1 server.

But the filter refused to work in 1.17.1, so I started testing it in various versions, and eventually found out that it was working perfectly till Snapshot 21w19a, but suddenly broke in 21w20a (around about when the switch to Java 16 was made).

Setup: 

1. In the server.properties file, text-filtering-config=

{
    "apiServer": "http://localhost:8000",
    "apiKey": "aaaaaaaa",
    "ruleId": 1,
    "serverid": "test",
    "hashesToDrop": 2,
    "maxConcurrentRequests": 4
}

2. And, NodeJS Script listening at port 8000: https://pastebin.com/TjvzgYae (Both, 1. and 2. are from Walshy's blog post)

3. Start the server, and put a message in chat that would be filtered by the script (for example, in this case, the word 'herobrine').

What should happen:

The chat message should be filtered according to the script, and then appear accordingly for all other players (in this case, the word 'herobrine' should appear as '*********').

What happens:

In versions 21w20a and above, the messages pass unfiltered. Everyone, including the sender and receiver(s), can see the original message irrespective of whether it was supposed to be filtered or not.

 

I have attached the client logs of the sender and receiver in both, 21w19a and 21w20a. Both the servers had identical setups (including server.properties and node.js scipt) and were newly generated worlds.

Attachments

Comments 5

Confirmed in 1.18-pre8

Should be fixed with arrival of per-player toggle. Please verify.

Does not work on 1.19.3 either

Blocking the entire message works in 1.19.3, but staring out words in the message does not.

Marking this as fixed on the latest change to the filter system. It's in constant use on Realms so if it doesn't work at all that would seem to be an issue with your server implementation. If something specific does not work please open a new bug instead of reusing this and make sure to include exact details of what you are sending.

CloverberryClose

(Unassigned)

Community Consensus

Normal

Social Interactions

chat-filter

1.17.1, 1.18.1, 1.19.3

1.19.1

Retrieved