Skip to content

Commit cbe7840

Browse files
authored
Fix Discord token regex censor pattern (EssentialsX#4563)
Discord changed their token format again
1 parent ff19645 commit cbe7840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
295295
try {
296296
files.add(new PasteUtil.PasteFile("discord-config.yml",
297297
new String(Files.readAllBytes(essDiscord.getDataFolder().toPath().resolve("config.yml")), StandardCharsets.UTF_8)
298-
.replaceAll("[MN][A-Za-z\\d]{23}\\.[\\w-]{6}\\.[\\w-]{27}", "<censored token>")));
298+
.replaceAll("[A-Za-z\\d]{24}\\.[\\w-]{6}\\.[\\w-]{27}", "<censored token>")));
299299
} catch (IOException e) {
300300
sender.sendMessage(tl("dumpErrorUpload", "discord-config.yml", e.getMessage()));
301301
}

0 commit comments

Comments
 (0)