Projet

Général

Profil

0002-ldap-do-not-return-referrals-in-_convert_results_to_.patch

Benjamin Dauvergne, 11 mars 2019 20:54

Télécharger (1,58 ko)

Voir les différences:

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(-)
src/authentic2/backends/ldap_backend.py
88 88
                if dn is not None:
89 89
                    # tuple is a real entry with a DN not a search reference
90 90
                    attrs = {attribute: filter_non_unicode_values(attrs[attribute]) for attribute in attrs}
91
                yield dn, attrs
91
                    yield dn, attrs
92 92

  
93 93
        def search_s(self, base, scope, filterstr='(objectclass=*)', attrlist=None, attrsonly=0):
94 94
            return self._convert_results_to_unicode(
......
147 147
                if dn is not None:
148 148
                    # tuple is a real entry with a DN not a search reference
149 149
                    attrs = {attribute: filter_non_unicode_values(attrs[attribute]) for attribute in attrs}
150
                yield force_text(dn), attrs
150
                    yield force_text(dn), attrs
151 151

  
152 152
        def search_s(self, base, scope, filterstr='(objectclass=*)', attrlist=None, attrsonly=0):
153 153
            base = force_bytes(base)
154
-