mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-10-06 18:38:00 +02:00
56fd936664
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing BungeeCord Changes: 4bb0fb67 Fix Javadoc in ServerInfo.getSocketAddress 68cc325a #2755: Add ClickEvent.COPY_TO_CLIPBOARD 3d3a5aef Remove unused .travis.yml 2c6a21d5 Remove stray import breaking build b7e7274b #2750: Don't special case TextComponent constructor with a single extra b70cb014 Add beta support for binding bungee to unix socket addresses 701391f2 Update Netty to 4.1.45.Final
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From a800541bf9f9f2557aa559671bcde723c8d37395 Mon Sep 17 00:00:00 2001
|
|
From: Techcable <Techcable@outlook.com>
|
|
Date: Sun, 7 Feb 2016 00:01:19 -0700
|
|
Subject: [PATCH] Add a property to accept invalid ping packets
|
|
|
|
This is disabled by default, as I don't wanna accept invalid packets
|
|
You can enable it by setting '-Dwaterfall.acceptInvalidPackets=true' at the command line
|
|
|
|
Fixes #23
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
index 4e5c8a5c..6fc5cd18 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
@@ -262,10 +262,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
thisState = State.PING;
|
|
}
|
|
|
|
+ private static final boolean ACCEPT_INVALID_PACKETS = Boolean.parseBoolean(System.getProperty("waterfall.acceptInvalidPackets", "false"));
|
|
+
|
|
@Override
|
|
public void handle(PingPacket ping) throws Exception
|
|
{
|
|
- Preconditions.checkState( thisState == State.PING, "Not expecting PING" );
|
|
+ if (!ACCEPT_INVALID_PACKETS) {
|
|
+ Preconditions.checkState(thisState == State.PING, "Not expecting PING");
|
|
+ }
|
|
unsafe.sendPacket( ping );
|
|
disconnect( "" );
|
|
}
|
|
--
|
|
2.25.0
|
|
|