kangarko / ChatControl-Pro

The ultimate chat solution. Prevent spam, ads, swears and even bots on your server. Replaced by ChatControl Red: https://mineacademy.org/chatcontrol-red
Other
66 stars 8 forks source link

Minecraft Version: 1.16.3 Unicode causes ArrayIndexOutOfBoundsException #2232

Closed x1p closed 3 years ago

x1p commented 3 years ago

Minecraft Version: 1.16.3 MySQL: true BungeeCord: true ChatControl version: 8.9.10

Error on console:

[11:37:41] [Async Chat Thread - #23/INFO]: *--------- Rule match (chat) for MijnBr --------- ID UNICODE
[11:37:41] [Async Chat Thread - #23/INFO]: MATCH: [^\u0000-\u007F]+
[11:37:41] [Async Chat Thread - #23/INFO]: CATCH: হ্যালো ইক বেন ইখট গোড ইক আন্দেরে তালেন টোচ
[11:37:41] [Async Chat Thread - #23/INFO]: FINAL:
[11:37:41] [Async Chat Thread - #23/INFO]: ChatControl 8.9.10 encountered an ArrayIndexOutOfBoundsException! Please check your error.log and report this issue with the information in that file.
[11:37:41] [Async Chat Thread - #23/INFO]: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
[11:37:41] [Async Chat Thread - #23/INFO]: at org.mineacademy.chatcontrol.lib.fo.ChatUtil.capitalize(ChatUtil.java:192)
[11:37:41] [Async Chat Thread - #23/INFO]: at org.mineacademy.chatcontrol.listener.ListenerChecker.checkChatMessage(ListenerChecker.java:386)
[11:37:41] [Async Chat Thread - #23/INFO]: at org.mineacademy.chatcontrol.listener.ListenerChecker.execute(ListenerChecker.java:56)
[11:37:41] [Async Chat Thread - #23/INFO]: at org.mineacademy.chatcontrol.listener.ListenerChecker.execute(ListenerChecker.java:41)
[11:37:41] [Async Chat Thread - #23/INFO]: at org.mineacademy.chatcontrol.lib.fo.event.SimpleListener.execute(SimpleListener.java:85)
[11:37:41] [Async Chat Thread - #23/INFO]: !-----------------------------------------------------!
[11:37:41] [Async Chat Thread - #23/INFO]: Unhandled exception listening to AsyncPlayerChatEvent
[11:37:41] [Async Chat Thread - #23/INFO]: !-----------------------------------------------------!
[11:37:41] [Async Chat Thread - #23/INFO]: [Rang02] MijnBr: হ্যালো ইক বেন ইখট গোড ইক আন্দেরে তালেন টোচ

Error.log

------------------------------------[ 30.12.2020 11:37:41 ]-----------------------------------
ChatControl 8.9.10 encountered an ArrayIndexOutOfBoundsException
Running Purpur 1.16.3-R0.1-SNAPSHOT and Java 11.0.6
Plugins: censored
----------------------------------------------------------------------------------------------

More Information: 
Unhandled exception listening to AsyncPlayerChatEvent
ArrayIndexOutOfBoundsException Index 0 out of bounds for length 0
     at org.mineacademy.chatcontrol.lib.fo.ChatUtil.capitalize(ChatUtil.java:192)
     at org.mineacademy.chatcontrol.listener.ListenerChecker.checkChatMessage(ListenerChecker.java:386)
     at org.mineacademy.chatcontrol.listener.ListenerChecker.execute(ListenerChecker.java:56)
     at org.mineacademy.chatcontrol.listener.ListenerChecker.execute(ListenerChecker.java:41)
     at org.mineacademy.chatcontrol.lib.fo.event.SimpleListener.execute(SimpleListener.java:85)
     at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
----------------------------------------------------------------------------------------------

Player tries exotic language

kangarko commented 3 years ago

We're no longer supporting Pro, you have to pay lots of money for ChatControl Onion to get this gub fixed

kangarko commented 3 years ago

Just kidding, we'll fix it tonight. Java doesn't support uppercasing those languages thought, so we'll only make it so no error is thrown. Happy holidays!

x1p commented 3 years ago

It's not just the error, the message is not blocked too.

I do have Red already, I'm just not ready to implement. Thnx

kangarko commented 3 years ago

Right, when the error is gone the message will continue to be filtered.