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).
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
Well January is coming to a close and I thought I would check if this was fixed yet. Sadly it is not fixed .
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:
Open a place which supports roblox’s default chat
Type a space ( ) and press enter. Do this at least 3 times
A message in chat will appear saying the chat filter is currently experiencing issues.