Quellcode durchsuchen

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

Signed-off-by: KaneLeung <kk.xiaolan@gmail.com>
KaneLeung vor 1 Jahr
Ursprung
Commit
d3a38ef71f
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs

+ 2 - 1
Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs

@@ -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())