Coder Social home page Coder Social logo

Can't set empty group about ldap3 HOT 7 CLOSED

cannatag avatar cannatag commented on August 28, 2024
Can't set empty group

from ldap3.

Comments (7)

cannatag avatar cannatag commented on August 28, 2024

hello, I can't test it now. In LDAP there is no idea of "empty" attributes. An empty attribute should not be shown at all. Probably the member attribute as a NULL value. Can you try with 'member':: [chr(0)] in the add operation?

Anyway are you sure that member can be empty? It it is defined as MUST in the schema it should have a value.

ANyway tomorrow I will test it in my lab.

Bye,
Giovanni

from ldap3.

jtgasper3 avatar jtgasper3 commented on August 28, 2024

Hi,

I tested the [chr(0)] and no luck:

{'message': 'member: value #0 invalid per syntax', 'description': 'invalidAttributeSyntax', 'referrals': None, 'result': 21, 'type': 'addResponse', 'dn': ''}

I quickly spun up a second ldap server (I have Docker images for openLdap and 389-ds) and tried the same ldif and it also accepted it.

Apache Directory Studio exports the entry as well.

from ldap3.

jtgasper3 avatar jtgasper3 commented on August 28, 2024

I found a reference in http://www.ldapexplorer.com/en/manual/103021500-edit-set-empty-value.htm to setting an Empty value for member in a group. This looks to be user-agent specific, but the principal is the same.

Thanks for looking into this.

from ldap3.

cannatag avatar cannatag commented on August 28, 2024

Hi, please check code in dev. I've releaxed the attribute checking. Now you can send an empty attribute value (with '') even if this is forbidden by the rfc.

attributes={'cn': "test2", 'member': ''},

Let me know if it works for you.

Bye,
Giovanni

from ldap3.

jtgasper3 avatar jtgasper3 commented on August 28, 2024

Thanks for working on this. I'll probably not be able to test until Monday, but wanted to let you know that I am not ignoring you.

from ldap3.

jtgasper3 avatar jtgasper3 commented on August 28, 2024

Hello,

Using attributes={'cn': "test2", 'member': ''}, worked perfectly for my case. Thanks!

Thanks for the attribution in the release notes... One side note... 389-ds also supports this empty case.

from ldap3.

cannatag avatar cannatag commented on August 28, 2024

thanks. released in 0.9.9.1

from ldap3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.