From 9c8d6245e89e1f8420edf0ef1557f3c073dc60ff Mon Sep 17 00:00:00 2001 From: bstrautin Date: Wed, 15 Feb 2023 18:01:16 -0500 Subject: [PATCH] Disable LDAP referrals Following referrals is disabled, to work around the error caused by Active Directory's referrals to other servers. Closes #1166 --- python/nav/web/ldapauth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/nav/web/ldapauth.py b/python/nav/web/ldapauth.py index 1aa5701a12..19fcd99907 100644 --- a/python/nav/web/ldapauth.py +++ b/python/nav/web/ldapauth.py @@ -100,6 +100,7 @@ def open_ldap(): uri = '%s://%s:%s' % (scheme, server, port) lconn = ldap.initialize(uri, bytes_mode=False) lconn.timeout = timeout + lconn.set_option(ldap.OPT_REFERRALS, 0) # Use STARTTLS if enabled, then fail miserably if the server # does not support it