[python-ldap] Issues with modifiModlist

Facundo Acevedo facevedo at openmailbox.org
Thu Nov 24 08:14:02 EST 2016


I've tried a little more, I think that it only occurs with reversed strings.

El 24/11/16 a las 09:58, Facundo Acevedo escribió:
> Hello, I've realized that the parameter of the old attribute is the same
> length that the new, modifyModlist do not works as expected, it returns
> an empty list.
> 
> Example code for reproduce the issue:
> 
> import ldap.modlist as modlist
> 
> value = "Python"
> reversed_value = value[::-1]
> old = {}
> new = {}
> old["sn"] = value
> new["sn"] = reversed_value
> 
> ldif = modlist.modifyModlist(old, new)
> 
> 
> I think the problem is in ldap/modlist.py:95
> replace_attr_value = len(old_value)!=len(new_value)
> 
> 
> Version information:
> Name: python-ldap
> Version: 2.4.27
> Python 2.7.12
> 
> 
> 
> Greetings!
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20161124/65182883/attachment.sig>


More information about the python-ldap mailing list