Compare commits

...

1 Commits

Author SHA1 Message Date
nv6 364175adc0 feat: try anonymous bind when bind credentials are empty (#979) 2026-07-08 17:11:30 +03:00
+6
View File
@@ -246,6 +246,12 @@ func (ldap *LdapService) BindService(rebind bool) error {
if ldap.cert != nil {
return ldap.conn.ExternalBind()
}
// attempt unauthenticated/anonymous bind if both BindDN and bindpw are unset
if ldap.config.LDAP.BindDN == "" && ldap.bindPw == "" {
return ldap.conn.UnauthenticatedBind("")
}
return ldap.conn.Bind(ldap.config.LDAP.BindDN, ldap.bindPw)
}