From 46a31bdceb920350a66efbfd521107d6a4ac2acf Mon Sep 17 00:00:00 2001 From: Liqf <109049295+LemonLiTree@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:41:49 +0800 Subject: [PATCH] [bug](user login)fix PASSWORD_LOCK_TIME setting UNBOUNDED does not take effect (#26585) --- .../java/org/apache/doris/mysql/privilege/PasswordPolicy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PasswordPolicy.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PasswordPolicy.java index 4b374b98e497d84..0033b992c311981 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PasswordPolicy.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PasswordPolicy.java @@ -410,7 +410,8 @@ public long leftSeconds() { } if (lockTime.get() > 0 && passwordLockSeconds == UNBOUNDED) { // unbounded lock - return 0; + // Returns 9999 seconds every time instead of 9999 seconds countdown + return 9999; } return Math.max(0, passwordLockSeconds - ((System.currentTimeMillis() - lockTime.get()) / 1000)); }