Filtering fails with empty string

if the first argument of FilterStringAsync() is = to “” or any amount of just the space character such as " " then the method crashes.

It only crashes on Live servers, does not crash in Studio.

Can reproduce it by chatting " " into the chat box in any game using ROBLOX Chat.

or you can just run this code from Dev Console:

local a = game.Chat:FilterStringAsync("",game.Players:GetPlayers()[1],game.Players:GetPlayers()[1]) print(a)

This caused some of my users to lose some of their data as I was not expecting this method to fail. (The data loss is mostly my fault, but I see no need to explain it here).

1 Like

Nice, thanks for the report.
I’ll just make this function return immediately in this case (and now that I think about it, probably any one or two letter case). No more updates for the rest of this year, so expect this January.

well 69 is two letters and I think that was being censored? so idk if allowing all 2 letter characters is wise.

Also it occurs with any amount of the Space character, length of the string does not matter, and it has to only contain the Space character.
All of these will fail:

a = ""
a = " "
a = "  "
a = "              "

I meant to put like 5 spaces in my OP, for the example, but Discourse auto reduced my spaces to 1.

According to other staff involved with chat filter, one-letter messages are specifically blocked to prevent people from chatting things vertically, so you might not want to implement that on a whim

community sift does not catch this as far as i can remember. (and it definitely won’t go back in time to filter stuff out in the past)

edit: just checked and no, it does not currently do it anyway. no idea what percentage of the load 0-2 character requests take up, but this could be a significant amount of load reduced

imo there are a lot more valid uses of the number 69 than stuff that should be censored. i myself wouldn’t want just the string to be filtered

3 Likes

IIRC 420 is also filtered which is pretty silly, with the same reasoning as filtering 69

I mean that @NobleDragon has said before that all single letter strings were blocked (in-game?) specifically for that reason:

But you can of course still just block them immediately without consulting Community Sift :derp:


Oh, guess it’s been changed then, if we’re talking about the same thing

Well January is coming to a close and I thought I would check if this was fixed yet. Sadly it is not fixed :frowning: .

running either of these from the Dev Console will cause it to error.

local a = game.Chat:FilterStringAsync("",game.Players:GetPlayers()[1],game.Players:GetPlayers()[1]) print(a)
-- or 
local a = game.Chat:FilterStringAsync("      ",game.Players:GetPlayers()[1],game.Players:GetPlayers()[1]) print(a)

This isn’t really that big of a deal, but it is quite annoying that I have to check for this in Lua before calling the Filter method, otherwise players wouldn’t be able to save blank text to say their custom hockey sticks in my game.

When typing 3 blank messages in chat, Roblox shows a message that the chat filter is currently experiencing issues, but this should not be shown since this is not the case.

I believe this is due to the filtering device trying to filter a blank string. This could be solved by removing spaces before the first character and after the last character.

Steps to reproduce:

  1. Open a place which supports roblox’s default chat
  2. Type a space ( ) and press enter. Do this at least 3 times
  3. A message in chat will appear saying the chat filter is currently experiencing issues.

Image of issue:
(provided by @Kampfkarren)
image

7 Likes