From 2bb6f8aab3fbce600a0be595a1e444ff3fa4abad Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 11 Mar 2019 20:45:43 +0100 Subject: [PATCH 2/5] ldap: do not return referrals in _convert_results_to_unicode (#31273) Wrong indentation kept referrals. --- src/authentic2/backends/ldap_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/authentic2/backends/ldap_backend.py b/src/authentic2/backends/ldap_backend.py index 4b5faa99..7b0899d8 100644 --- a/src/authentic2/backends/ldap_backend.py +++ b/src/authentic2/backends/ldap_backend.py @@ -88,7 +88,7 @@ if PYTHON_LDAP3 is True: if dn is not None: # tuple is a real entry with a DN not a search reference attrs = {attribute: filter_non_unicode_values(attrs[attribute]) for attribute in attrs} - yield dn, attrs + yield dn, attrs def search_s(self, base, scope, filterstr='(objectclass=*)', attrlist=None, attrsonly=0): return self._convert_results_to_unicode( @@ -147,7 +147,7 @@ elif PYTHON_LDAP3 is False: if dn is not None: # tuple is a real entry with a DN not a search reference attrs = {attribute: filter_non_unicode_values(attrs[attribute]) for attribute in attrs} - yield force_text(dn), attrs + yield force_text(dn), attrs def search_s(self, base, scope, filterstr='(objectclass=*)', attrlist=None, attrsonly=0): base = force_bytes(base) -- 2.20.1