🏚️同步域用户时缺少密码解密

This commit is contained in:
KaneLeung 2024-12-13 13:53:26 +08:00
parent 747dbf39e6
commit 0b2ca444bd

View File

@ -190,7 +190,8 @@ public class SysLdapService : IDynamicApiController, ITransient
try
{
ldapConn.Connect(sysLdap.Host, sysLdap.Port);
ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, sysLdap.BindPass);
string bindPass = CryptogramUtil.Decrypt(sysLdap.BindPass);
ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, bindPass);
var ldapSearchResults = ldapConn.Search(sysLdap.BaseDn, LdapConnection.ScopeOne, "(objectClass=*)", null, false);
var userLdapList = new List<SysUserLdap>();
while (ldapSearchResults.HasMore())