Skip to content

Commit

Permalink
Disable LDAP referrals
Browse files Browse the repository at this point in the history
Following referrals is disabled, to work around the error caused by
Active Directory's referrals to other servers.

Closes #1166
  • Loading branch information
bstrautin authored and lunkwill42 committed Feb 21, 2023
1 parent 7640119 commit 9c8d624
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/nav/web/ldapauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c8d624

Please sign in to comment.