File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
integration-test/src/test/java/org/apache/iotdb/db/it/auth
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1594,4 +1594,16 @@ public void testPasswordHistoryAlter(Statement statement) throws SQLException {
15941594 resultSet .getString ("root.__system.password_history._userA.oldPassword" ));
15951595 }
15961596 }
1597+
1598+ @ Test
1599+ public void testChangeBackPassword () {
1600+ try (Connection connection = EnvFactory .getEnv ().getConnection ();
1601+ Statement statement = connection .createStatement ()) {
1602+ statement .execute ("ALTER USER root SET PASSWORD 'newPassword'" );
1603+ statement .execute ("ALTER USER root SET PASSWORD 'root'" );
1604+ } catch (SQLException e ) {
1605+ e .printStackTrace ();
1606+ fail (e .getMessage ());
1607+ }
1608+ }
15971609}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public class AuthUtils {
5353 private static final String ROOT_PREFIX = IoTDBConstant .PATH_ROOT ;
5454 private static final int NAME_MIN_LENGTH = 4 ;
5555 private static final int NAME_MAX_LENGTH = 32 ;
56- private static final int PASSWORD_MIN_LENGTH = 12 ;
56+ private static final int PASSWORD_MIN_LENGTH = 4 ;
5757 private static final int PASSWORD_MAX_LENGTH = 32 ;
5858
5959 // match number, character, and !@#$%^*()_+-=
You can’t perform that action at this time.
0 commit comments