1.0.2 - Suppress vote requests over 256 bytes

This commit is contained in:
NotAlexNoyle committed 2026-04-06 03:01:07 -04:00
1 parent 4a90995589
commit c697099eeb
2 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ kotlin { jvmToolchain(17) }
/* ----------------------------- Metadata ------------------------------ */
group = "net.trueog.votifier-og" // Declare bundle identifier.
version = "1.0.1" // Declare plugin version (will be in .jar).
version = "1.0.2" // Declare plugin version (will be in .jar).
val apiVersion = "1.19" // Declare minecraft server target version.
@@ -29,9 +29,10 @@ public class VotifierProtocol1Decoder extends ByteToMessageDecoder {
}
if (buf.readableBytes() > 256) {
// They sent too much data.
throw new QuietException(
"Could not decrypt data from " + ctx.channel().remoteAddress() + " as it is too long. Attack?");
// They sent too much data - silently drop the connection.
buf.skipBytes(buf.readableBytes());
ctx.close();
return;
}
byte[] block = ByteBufUtil.getBytes(buf);