From 2c9f371595add1777ea05962dc4e94fb22436273 Mon Sep 17 00:00:00 2001 From: JotaDevMC Date: Sat, 9 May 2020 18:46:05 +0200 Subject: [PATCH] forceLogin now doesn't skip 2FA system --- .../fr/xephi/authme/process/login/AsynchronousLogin.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java index 56d5236de..907e4fed3 100644 --- a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java @@ -114,7 +114,13 @@ public void login(Player player, String password) { public void forceLogin(Player player) { PlayerAuth auth = getPlayerAuth(player); if (auth != null) { - performLogin(player, auth); + if (auth.getTotpKey() != null) { + limboService.resetMessageTask(player, LimboMessageType.TOTP_CODE); + limboService.getLimboPlayer(player.getName()).setState(LimboPlayerState.TOTP_REQUIRED); + // TODO #1141: Check if we should check limbo state before processing password + } else { + performLogin(player, auth); + } } }