Browse Source

Update weed/iam/ldap/ldap_provider.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/8003/head
Chris Lu 9 hours ago
committed by GitHub
parent
commit
6559daeac5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      weed/iam/ldap/ldap_provider.go

2
weed/iam/ldap/ldap_provider.go

@ -383,7 +383,7 @@ func (p *LDAPProvider) Authenticate(ctx context.Context, credentials string) (*p
if err = conn.Bind(config.BindDN, config.BindPassword); err != nil {
glog.V(2).Infof("LDAP rebind to service account failed: %v", err)
conn.Close() // Close on error, don't return to pool
return nil, fmt.Errorf("LDAP rebind failed: %w", err)
return nil, fmt.Errorf("LDAP service account rebind failed after successful user authentication (check bindDN %q and its credentials): %w", config.BindDN, err)
}
}
// Now safe to defer return to pool with clean service account binding

Loading…
Cancel
Save