From 230a98663687284eafb80c19f3940f10f4701f12 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Sat, 23 May 2026 14:40:55 +0200 Subject: [PATCH] ldap: switch of chasing referrals It is switched off in the OpenLDAP backend, so we should do the same here. Follow-up to cdc1da912066535680f02eb31 Closes #21732 --- lib/ldap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ldap.c b/lib/ldap.c index ed74e9a19a..d8ec859126 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -315,6 +315,9 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) #endif ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); + /* Do not chase referrals. */ + ldap_set_option(server, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); + if(ldap_ssl) { #ifdef HAVE_LDAP_SSL #ifdef USE_WIN32_LDAP