Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-264829

Text Filter on signs doesn't hide if fully filtered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w31a
    • 1.20.1
    • None
    • Confirmed
    • Dedicated Server, Text

      if a player with the account text filter disabled* makes a sign with a line that gets fully filtered by the text-filter-config specified in server.properties (either since it exceeds hashes to drop, or the "hashed" key in the response doesn't exist), then the line is shown to players with the text filter enabled, even though the line should be fully hidden.

      this is due to an empty component in the filtered_message defaulting to messages,

      which while correct if the message is fully allowed, is incorrect if the whole line should be empty for users playing with the text filter

      Reproduction

      1. have a webserver providing text-filtering. i have made https://textfilter-server.the456gamer.workers.dev/ as a demo, use https://textfilter-server.the456gamer.workers.dev/exampleconfig to copy the text-filtering-config**
      2. ensure the dedicated server is running, with the text-filter-config set to the right url, and hashes to drop being 0 (so every text would cause it to be empty)
      3. on an account with textfilter disabled,* place a sign with a line that gets filtered
      4. on an account with textfilter enabled, observe that the sign contains the line that should be filtered

       

      tested with the following sign

      123: filtered line
      abc: unfiltered lin
      semi-filtered line

      with the filter:

      if line contains "abc": never filter

      if line contains "123": always fully filter

      else: filter every character

      placed on unfiltered client, viewed on filtered client

      placed on filtered client, viewed on filtered client (what both should look like on filtered client)

      *: this is needed as otherwise the filtered text will be placed into the messages: tag, not filtered_messages where the fallback exists

      **: this logs the requests to discord, see root url for more info

            Unassigned Unassigned
            The456gamer The456gamer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: