FilterStringForPlayerAsync Bug

Hey. There are multiple special cases where FilterStringForPlayerAsync is causing a HTTP 500 [Internal Server Error] response. I spent a while trying various different strings but couldn’t manage to narrow down the exact cause of the issue.

Here’s an example reproduction script:

game:GetService("Chat"):FilterStringForPlayer("For example, consider a free particle. In quantum mechanics, there is wave–particle duality, so the properties of the particle can be described as the properties of a wave. Therefore, its quantum state can be represented as a wave of arbitrary shape and extending over space as a wave function.", player)

The player should probably be a 13+ account, as that’s what I tested it with.

I have run some diagnostics to discover the cause of the error. There is a limit of 163 characters imposed on strings you can filter, anything above this and the method will error. I have amended the wiki so that in the future others are aware of this.

Actually, I believe that you are incorrect. The following works:

game:GetService("Chat"):FilterStringForPlayerAsync("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr", player)

That is odd, I filtered multiple strings and only that and another I have tried made it beyond the 163 character mark. I will edit the wiki back, perhaps the issue is related to the encoding method. Since the only strings that have made it through are combinations of letters.

Created the issue [#690] on the bug tracker, which also documents the various things I know about the bug.

Bump. I’d really like this looked into. It’s a pretty odd bug.

Another bump. :3
I feel that this is a pretty important issue.