Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exop sample (whois) not working #370

Closed
ptusch opened this issue Apr 28, 2016 · 2 comments
Closed

exop sample (whois) not working #370

ptusch opened this issue Apr 28, 2016 · 2 comments

Comments

@ptusch
Copy link

ptusch commented Apr 28, 2016

Hi,

the exop sample on ldapjs.org does not work with OpenLDAP (2.4.40).
It seems to be that ldapjs doesn't fully respect RFC 4532.
Point 2.1. of the RFC:

[...] The whoami request is an ExtendedRequest with a requestName field
containing the whoamiOID OID and an absent requestValue field. [...]

Here's my output for exop with the OID 1.3.6.1.4.1.4203.1.11.3

ProtocolError: no request data expected

Removing L589 of the client.js, results is a nice WhoIs output.

This is my sample to call the exop with the who is OID:

function whoami() {

  return new Promise((resolve, reject) => {

    client.exop('1.3.6.1.4.1.4203.1.11.3', (err, value, res) => {

      if (!!err) {
        return reject(err);
      }
      return resolve(value);
    });
  });
}

The problem is that requestValue is encoded into Ber and then send to LDAP.

I'm not sure how to solve the issue without much trouble. I don't know all OID and their RFC so I assume having a list of OID which need to be treated special is needed.
Simply removing the key requestValue when the content is null sounds like trouble.

Any thoughts on this and how you'd like it to be solved? I'd totally PR you with a fix.

Some additional data about my versions:
node: 4.3.3
ldapjs: 1.0.0

@ptusch ptusch changed the title exop sample (whoami) not working exop sample (whois) not working Apr 28, 2016
@jsumners jsumners added the potential-ci-test Issues that may need a CI test against an OpenLDAP server label Aug 26, 2019
@jsumners jsumners removed the potential-ci-test Issues that may need a CI test against an OpenLDAP server label Nov 16, 2019
jsumners added a commit that referenced this issue Nov 16, 2019
jsumners added a commit that referenced this issue Nov 16, 2019
* Initial integration test, um, test

* Hack in service

* Add integration test for issue #480

* Add fix for issue #418

* Add fix for issue #370
@jsumners
Copy link
Member

This issue should be resolved in ldapjs@2.0.0-pre.3. Please give it a try if you are still affected.

@jsumners
Copy link
Member

⚠️ This issue has been locked due to age. If you have encountered a recent
problem that seems to be covered by this issue, please open a new issue.

Please include a minimal reproducible example
when opening a new issue.

@ldapjs ldapjs locked as resolved and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants