2023-09-23 03:27:23 +02:00
|
|
|
From 372e00bb354ee567d0d9d8c6831b99538f2224f8 Mon Sep 17 00:00:00 2001
|
2022-03-22 15:59:09 +01:00
|
|
|
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
|
2023-09-23 03:27:23 +02:00
|
|
|
index c75e9bad..cbc45c5c 100644
|
2022-03-22 15:59:09 +01:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
2023-09-23 03:27:23 +02:00
|
|
|
@@ -425,7 +425,8 @@ public final class UserConnection implements ProxiedPlayer
|
2022-03-22 15:59:09 +01:00
|
|
|
|
|
|
|
private String connectionFailMessage(Throwable cause)
|
|
|
|
{
|
2022-04-25 18:52:14 +02:00
|
|
|
- return groups.contains( "admin" ) ? Util.exception( cause, false ) : cause.getClass().getName();
|
|
|
|
+ bungee.getLogger().log(Level.WARNING, "Error occurred processing connection for " + this.name + " " + Util.exception( cause, false )); // Waterfall
|
|
|
|
+ return ""; // Waterfall
|
2022-03-22 15:59:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
--
|
2023-09-21 12:33:23 +02:00
|
|
|
2.42.0
|
2022-03-22 15:59:09 +01:00
|
|
|
|