Remove the lower casting on dn attributions

#10 Declined
  1. Guillaume Pannatier

My directory contain ldap element that have in DN some uppercase letters. uniqueIdentifier=xxxx,.....

Because mockldap change the DN in a lowercase DN, some problems occurs. For example, with the django-db backend. - When change an attribute on an object and then save it, django-db think that my object was renamed and try to update them.

Comments (2)

  1. Peter Sagerson repo owner

    I can try to take a look at this some time, but it seems unlikely that we could casually make this change without breaking existing clients. This might be the right thing to do in the long run, but it's a long road to be sure that it's doing more good than harm. A safer alternative, especially in the short term, might be to add some kind of configuration option that controls case-preserving behavior. With unit tests and documentation, as always.

  2. Guillaume Pannatier author

    Changes on this pull request will surely break existing clients. I have made other change in my fork of this usefull project that I think will not break existing clients and will correct myissues. If you have some time, take a look in my fork.

    I remove lower() on directory init and addition. I change the _s_search method like this

        base_parts = ldap.dn.explode_dn(base.lower())
        base_len = len(base_parts)
        dn_parts = dict((dn, ldap.dn.explode_dn(dn.lower())) for dn in

    I change too tests.