You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation states that MiniMessage::deserialize should never throw by default, but when a double quote is left unclosed in the argument list of a tag (e.g. <hover:show_text_:">), a StringIndexOutOfBoundsException is thrown.
Here is the relevant stacktrace:
at java.base/java.lang.String.substring(String.java:2709)
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.unescape(TokenParser.java:620)
at net.kyori.adventure.text.minimessage.internal.parser.node.TagPart.unquoteAndEscape(TagPart.java:109)
at net.kyori.adventure.text.minimessage.internal.parser.node.TagPart.<init>(TagPart.java:53)
at net.kyori.adventure.text.minimessage.internal.parser.match.StringResolvingMatchedTokenConsumer.accept(StringResolvingMatchedTokenConsumer.java:90)
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.parseString(TokenParser.java:247)
at net.kyori.adventure.text.minimessage.internal.parser.TokenParser.resolvePreProcessTags(TokenParser.java:112)
at net.kyori.adventure.text.minimessage.MiniMessageParser.parseToTree(MiniMessageParser.java:195)
The text was updated successfully, but these errors were encountered:
The parser tries to un-quote tag parts surrounded by quotes, it does so
by checking if the first character of the tag part is a quote and the
last character is as well. However, things break if that first and last
character are actually the same character! A
StringIndexOutOfBoundsException is thrown later on.
This patch makes it so tag parts consisting of a single quote aren't
tried to be un-quoted, they stay as is
Fixes#1011
The documentation states that
MiniMessage::deserialize
should never throw by default, but when a double quote is left unclosed in the argument list of a tag (e.g.<hover:show_text_:">
), aStringIndexOutOfBoundsException
is thrown.Here is the relevant stacktrace:
The text was updated successfully, but these errors were encountered: