[python-ldap] SimplePagedResultsControl

Michael Ströder michael at stroeder.com
Fri Dec 12 11:42:46 CET 2014


HI!

I'd like to hear opinions.

The current implementation of SimplePagedResultsControl relys on some
(unmaintained) C code:
Modules/ldapcontrol.c
functions encode_rfc2696() and decode_rfc2696()

It seems that decode_rfc2696() returns the wrong 'size' extracted from the
response control value.

To verify the bug I've implemented a pure Python control class
ldap.controls.pagedresults.SimplePagedResultsControl
which is actually a drop-in replacement
ldap.controls.libldap.SimplePagedResultsControl
and seems to work (interop tests with OpenLDAP and MS AD).

Currently ldap.controls imports libldap.SimplePagedResultsControl as default.

I'm inclined to change that and even remove the old implementation completely.
But this would mean that a dependency to pyasn1 is introduced for code using
class SimplePagedResultsControl.

So the question boils down to:

How many of you are using python-ldap with SimplePagedResultsControl without
installing pyasn1?
Note that without pyasn1 many LDAPv3 extended controls in python-ldap cannot
be used anyway.

Ciao, Michael.

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


More information about the python-ldap mailing list