Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

no support for empty credentials #254

Closed
meeech opened this issue Feb 27, 2015 · 5 comments
Closed

no support for empty credentials #254

meeech opened this issue Feb 27, 2015 · 5 comments
Assignees
Labels

Comments

@meeech
Copy link

meeech commented Feb 27, 2015

hi. a bit new to poking around with ldap, but I think I found a problem. Trying to leave credentials blank (anonymous usage)
but here:
https://github.com/mcavage/node-ldapjs/blob/master/lib/client/client.js#L468

assert.string(credentials, 'credentials');

but a few lines down, there is support for credentials being falsy
https://github.com/mcavage/node-ldapjs/blob/master/lib/client/client.js#L480

var req = new BindRequest({
    name: name || '',
    authentication: 'Simple',
    credentials: credentials || '',
    controls: controls
  });

So before i do a pr removing the assert, wanted to check with you.

@pfmooney
Copy link
Contributor

I would have to double-check the LDAP spec but using assert.optionalString would probably do the trick.

@pfmooney pfmooney self-assigned this Feb 27, 2015
@pfmooney pfmooney added the bug label Feb 27, 2015
@ssteffl
Copy link

ssteffl commented Apr 12, 2015

i would like this too.

msimerson added a commit to msimerson/node-ldapjs that referenced this issue Apr 14, 2015
msimerson added a commit to msimerson/node-ldapjs that referenced this issue Apr 14, 2015
@ssteffl
Copy link

ssteffl commented Apr 15, 2015

i am trying to query with anonymous credetials but am getting this error from teh server:

OperationsError: 000004DC: LdapErr: DSID-0C0906E8, 
comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1  

does this mean the server does not allow anonymous credentials? my binding code looks like this:

var c = ldapjs.createClient({
    url: //the server uri 
    maxConnections:50,
});
c.bind('', '', function(err){ if(err) throw new Error(err); });

@samypr100
Copy link

When is this going to be released as a tag? I'm using full repo url on npm due to this fix.

@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants