This is an automated email from the ASF dual-hosted git repository. jiangtian pushed a commit to branch revert_password_length_limit in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 30b76194dc6bcce765951a0c9e4a96d8bd0323e8 Author: Tian Jiang <jt2594...@163.com> AuthorDate: Mon Aug 4 10:27:50 2025 +0800 Revert password length limit --- .../test/java/org/apache/iotdb/db/it/auth/IoTDBAuthIT.java | 12 ++++++++++++ .../main/java/org/apache/iotdb/commons/utils/AuthUtils.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/auth/IoTDBAuthIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/auth/IoTDBAuthIT.java index 231d9ce7215..98467604409 100644 --- a/integration-test/src/test/java/org/apache/iotdb/db/it/auth/IoTDBAuthIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/db/it/auth/IoTDBAuthIT.java @@ -1594,4 +1594,16 @@ public class IoTDBAuthIT { resultSet.getString("root.__system.password_history._userA.oldPassword")); } } + + @Test + public void testChangeBackPassword() { + try (Connection connection = EnvFactory.getEnv().getConnection(); + Statement statement = connection.createStatement()) { + statement.execute("ALTER USER root SET PASSWORD 'newPassword'"); + statement.execute("ALTER USER root SET PASSWORD 'root'"); + } catch (SQLException e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java index 8fe1bfab720..09824dfbd69 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java @@ -53,7 +53,7 @@ public class AuthUtils { private static final String ROOT_PREFIX = IoTDBConstant.PATH_ROOT; private static final int NAME_MIN_LENGTH = 4; private static final int NAME_MAX_LENGTH = 32; - private static final int PASSWORD_MIN_LENGTH = 12; + private static final int PASSWORD_MIN_LENGTH = 4; private static final int PASSWORD_MAX_LENGTH = 32; // match number, character, and !@#$%^*()_+-=