webbukkit/dynmap — Issue #531: Webchat can crash server
Author: Endimmion
Created: 2011-12-29 09:52:32+00:00
State: open

Some managed to crash my server using some spam characters in webchat.

This bug/issue happen on Dynmap 0.27 / Craftbukkit Build 1597 / Minecraft 1.0.1

Logs:

2011-12-27 16:41:56 [INFO] [dynmap] §2[WEB] web-011: §f?.,__,.........,__,....... _______ `·.,¸,.·*¯`·.,¸,.·*¯..|::::::/\:_|/\ `·.,¸,.·*¯`·.,¸,.·*¯<|:::::( ???) -........--""-.......--"""u"''''''''''u''''''''u
2011-12-27 16:41:56 [INFO] [32m[WEB] web-011: [37m?.,__,.........,__,....... _______ `·.,¸,.·*¯`·.,¸,.·*¯..|::::::/:_|/ `·.,¸,.·*¯`·.,¸,.·*¯<|:::::( ???) -........--""-.......--"""u"''''''''''u''''''''u [0m
2011-12-27 16:42:37 [INFO] [dynmap] §2[WEB] web-011: §f?.,__,.........,__,....... _______
2011-12-27 16:42:37 [INFO] [32m[WEB] web-011: [37m?.,__,.........,__,....... _______[0m
2011-12-27 16:42:43 [INFO] [dynmap] §2[WEB] web-011: §f`·.,¸,.·*¯`·.,¸,.·*¯..|::::::/\:_|/\
2011-12-27 16:42:43 [SEVERE] [dynmap] HttpHandler 'org.dynmap.InternalClientUpdateComponent$2@46e70518' has thown an exception
java.lang.StringIndexOutOfBoundsException: String index out of range: 36
at java.lang.String.charAt(String.java:695)
at java.util.regex.Matcher.appendReplacement(Matcher.java:762)
at java.util.regex.Matcher.replaceAll(Matcher.java:906)
at java.lang.String.replaceAll(String.java:2210)
at org.dynmap.SimpleWebChatComponent$1.triggered(SimpleWebChatComponent.java:26)
at org.dynmap.SimpleWebChatComponent$1.triggered(SimpleWebChatComponent.java:1)
at org.dynmap.Event.trigger(Event.java:29)
at org.dynmap.Events.trigger(Events.java:35)
at org.dynmap.InternalClientUpdateComponent.webChat(InternalClientUpdateComponent.java:54)
at org.dynmap.InternalClientUpdateComponent$2$1.triggered(InternalClientUpdateComponent.java:38)
at org.dynmap.InternalClientUpdateComponent$2$1.triggered(InternalClientUpdateComponent.java:1)
at org.dynmap.Event.trigger(Event.java:29)
at org.dynmap.web.handlers.SendMessageHandler.handle(SendMessageHandler.java:104)
at org.dynmap.web.HttpServerConnection.run(HttpServerConnection.java:218)
2011-12-27 16:42:43 [INFO] [35m[Server] Server is restarting. World is being saved.[0m