You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by mo...@apache.org on 2022/11/18 15:12:50 UTC
[incubator-streampark] branch dev updated: [Bug] ldap create user bug fixed (#2059)
This is an automated email from the ASF dual-hosted git repository.
monster pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new ef6fd6d4c [Bug] ldap create user bug fixed (#2059)
ef6fd6d4c is described below
commit ef6fd6d4c4de86665620b9c0f9dde40d1ebaf3c5
Author: benjobs <be...@apache.org>
AuthorDate: Fri Nov 18 23:12:45 2022 +0800
[Bug] ldap create user bug fixed (#2059)
---
.../console/system/security/impl/AuthenticatorImpl.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
index 86dd93d05..b6728ff5a 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
@@ -67,13 +67,10 @@ public class AuthenticatorImpl implements Authenticator {
newUser.setUsername(username);
newUser.setNickName(username);
newUser.setUserType(UserType.USER);
- newUser.setStatus("1");
- newUser.setSex("1");
- String salt = ShaHashUtils.getRandomSalt();
- String saltPass = ShaHashUtils.encrypt(salt, password);
- newUser.setSalt(salt);
- newUser.setPassword(saltPass);
+ newUser.setStatus(User.STATUS_VALID);
+ newUser.setSex(User.SEX_UNKNOW);
+ newUser.setPassword(password);
usersService.createUser(newUser);
return newUser;
}
-}
\ No newline at end of file
+}