Don't send exceptions to the client during kicks, etc

The info here is often not filtered down and can often contain
internal information during these kicks which server owners are
generally not happy with sharing, i.e. potential IP addresses, etc

We'll have to dump the cause to the console manually to ensure that
data is still sent, but, a wider fix here is probably needed which
allows for retaining much of the overall context here, i.e. who
was this exception assocated with?
This commit is contained in:
Shane Freeder 2022-03-22 14:59:09 +00:00
parent c40d7af454
commit 31ff8e083c
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From 951b7e18e37abebc4c74643aaa820648114f0343 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 22 Mar 2022 14:56:44 +0000
Subject: [PATCH] Don't send exceptions to the client during kicks, etc
The info here is often not filtered down and can often contain
internal information during these kicks which server owners are
generally not happy with sharing, i.e. potential IP addresses, etc
We'll have to dump the cause to the console manually to ensure that
data is still sent, but, a wider fix here is probably needed which
allows for retaining much of the overall context here, i.e. who
was this exception assocated with?
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index 4a858f31..0d6aff64 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -398,7 +398,11 @@ public final class UserConnection implements ProxiedPlayer
private String connectionFailMessage(Throwable cause)
{
- return Util.exception( cause, false );
+ // Waterfall start
+ cause.printStackTrace();
+ return "";
+ //return Util.exception( cause, false );
+ // Waterfall end
}
@Override
--
2.35.1