Explorar el Código

先去掉验证,因为如果默认跳过在bind_dn和password为默认值时会跳过密码验证

huangrf hace 6 años
padre
commit
42b0a7cd1b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      utils/auth/ldap_auth.go

+ 1 - 1
utils/auth/ldap_auth.go

@@ -92,7 +92,7 @@ func (h ldapHandler) Search(boundDN string, searchReq ldap.SearchRequest, conn n
 			}
 			entries := []*ldap.Entry{
 				&ldap.Entry{dn, []*ldap.EntryAttribute{
-					&ldap.EntryAttribute{"uid", []string{}},
+					//&ldap.EntryAttribute{"uid", []string{}},
 				}},
 			}
 			return ldap.ServerSearchResult{entries, []string{}, []ldap.Control{}, ldap.LDAPResultSuccess}, nil