[python-ldap] search_s() appends failed referral references as results

Michael Ströder michael at stroeder.com
Fri Mar 28 07:34:54 CET 2014


Richard Li wrote:
> Maybe such behavior should be mentioned in the documentation? Right now it
> does not mention anything about referral objects and only states (dn,
> attrs) is (str, dict) tuple.

Yes. Feel free to submit a doc patch.

Ciao, Michael.

> On Thu, Mar 27, 2014 at 2:47 AM, Michael Ströder <michael at stroeder.com>wrote:
> 
>> Richard Li wrote:
>>> I'm working with some code that does LDAP authentication against
>>> ActiveDirectory, and I'm tracking an error down to a strange behavior in
>>> the search_s() of LDAPObject:
>>>
>>> It seems when a referral reference is returned with search results and
>>> referral reference couldn't be reached, search_s() leaves the them in the
>>> returned result list as a tuple (None, ['ldap://referral_uri'])
>>>
>>> Is that an intended behavior of search_s() ?
>>
>> Yes, that's correct. Otherwise you would'nt receive search continuations.
>> You
>> should simply sort them out.
>>
>> BTW: You could configure your application to use the global catalog. No
>> search
>> continuations are returned by AD in this case. The caveat is that not all
>> user
>> entry attributes are available there.
>>
>> Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140328/688ce11f/attachment.bin>


More information about the python-ldap mailing list