fix: 当用户策略为clear时,存入原文 (#341)

This commit is contained in:
二丫讲梵 2024-05-14 22:15:13 +08:00 committed by GitHub
parent 2fe390f1e3
commit e2c2ea6bfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ func (x UserService) Add(user *model.User) error {
add.Attribute("uid", []string{user.Username})
var pass string
if config.Conf.Ldap.UserPasswordEncryptionType == "clear" {
pass = user.Password
pass = tools.NewParPasswd(user.Password)
} else {
pass = tools.EncodePass([]byte(tools.NewParPasswd(user.Password)))
}