This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch fix-login
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/fix-login by this push:
new 5b3c01c12d9 fix-1
5b3c01c12d9 is described below
commit 5b3c01c12d920cc32fd43b4042e2a2f314ec0fd1
Author: Caideyipi <[email protected]>
AuthorDate: Sat Mar 21 22:56:39 2026 +0800
fix-1
---
.../apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java | 1 -
.../org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
index cf537d5c667..3c0095c9155 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java
@@ -83,7 +83,6 @@ public class AuthorPlanExecutor implements
IAuthorPlanExecutor {
status = authorizer.login(username, password, useEncryptedPassword);
if (status) {
result = getUserPermissionInfo(username, ModelType.ALL);
-
result.setStatus(RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS,
"Login successfully"));
} else {
result = AuthUtils.generateEmptyPermissionInfoResp();
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
index 6ba8c5336b1..948feb8b250 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java
@@ -116,7 +116,10 @@ public abstract class BasicAuthorizer implements
IAuthorizer, IService {
TSStatusCode.USER_NOT_EXIST, String.format("The user %s does not
exist.", username));
}
if (useEncryptedPassword) {
- return password.equals(user.getPassword());
+ if (password.equals(user.getPassword())) {
+ return true;
+ }
+ throw new AuthException(TSStatusCode.WRONG_LOGIN_PASSWORD, "Incorrect
password.");
}
if (AuthUtils.validatePassword(
password, user.getPassword(),
AsymmetricEncrypt.DigestAlgorithm.SHA_256)) {