Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Prevent handshake spam from invalid names.
Dieser Commit ist enthalten in:
Ursprung
079dc61259
Commit
4cc6854a67
@ -0,0 +1,21 @@
|
||||
From f22c9b13df956663f41d000bea443a737624b91c Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin James Harrison-Sims <tehrainbowguy@gmail.com>
|
||||
Date: Sun, 14 Apr 2013 03:08:51 +0100
|
||||
Subject: [PATCH] Prevent handshake spam from invalid names.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet2Handshake.java b/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
index 343af93..920e045 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
@@ -19,6 +19,7 @@ public class Packet2Handshake extends Packet {
|
||||
this.b = a(datainputstream, 16);
|
||||
this.c = a(datainputstream, 255);
|
||||
this.d = datainputstream.readInt();
|
||||
+ if(!this.b.matches("^[a-zA-Z0-9_]{3,16}$")){throw new IOException("Invalid name!");}// Spigot
|
||||
}
|
||||
|
||||
public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException
|
||||
--
|
||||
1.8.2.1
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren