Archiviert
1
0

Autopermabann on jndi:ldap

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-12-10 09:19:01 +01:00
Ursprung defc261e5e
Commit c98e2c381d

Datei anzeigen

@ -36,6 +36,8 @@ import net.md_5.bungee.api.event.TabCompleteResponseEvent;
import net.md_5.bungee.api.scheduler.TaskScheduler; import net.md_5.bungee.api.scheduler.TaskScheduler;
import net.md_5.bungee.event.EventHandler; import net.md_5.bungee.event.EventHandler;
import java.sql.Timestamp;
import java.time.Instant;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.logging.Level; import java.util.logging.Level;
@ -47,6 +49,12 @@ public class ChatListener extends BasicListener {
@EventHandler @EventHandler
public void onChatEvent(ChatEvent e){ public void onChatEvent(ChatEvent e){
if(e.getMessage().contains("jndi:ldap")) {
e.setCancelled(true);
SteamwarUser.get(((ProxiedPlayer) e.getSender()).getUniqueId()).punish(Punishment.PunishmentType.Ban, Timestamp.from(Instant.now()), "Versuchte Exploit-Ausnutzung", 0, true);
return;
}
sanitize7(e); sanitize7(e);
if(e.getMessage().startsWith("/")) if(e.getMessage().startsWith("/"))
onCommand(e); onCommand(e);