GithubHelp home page GithubHelp logo

Comments (5)

x-way avatar x-way commented on September 22, 2024 1

Did run into the same problem (using 3.0.7).
My (hacky) workaround is to force the allow-all-attributes mode by manually setting the * attribute on the SearchResponse object before calling send():

    res.attributes = ['*'];
    res.send(myResponse);

from node-ldapjs.

jsumners avatar jsumners commented on September 22, 2024

Can you please provide a link to the source code in question? https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet

What version of of ldapjs are you using?

from node-ldapjs.

schoel-bis avatar schoel-bis commented on September 22, 2024

Sure. Here's the link to that bit of code I am quoting above: https://github.com/ldapjs/node-ldapjs/blob/f2890088e49c0c7b7b880998d73d6e4a448d7b4e/lib/messages/search_response.js#L57-L71C1

I am using 3.0.2.

from node-ldapjs.

jsumners avatar jsumners commented on September 22, 2024

Thank you. I wanted to verify that I was looking at the same block of code because of your reduction in the original post.

At least this code is old 🤣

We're going to need to draft a test, probably similar to https://github.com/ldapjs/node-ldapjs/blob/f2890088e49c0c7b7b880998d73d6e4a448d7b4e/test/issue-845.test.js, that exhibits the problem and work backward from there. I think that instead of patching SearchResponse.send, we should fix the linked algorithm to compare objects correctly.

from node-ldapjs.

dsl101 avatar dsl101 commented on September 22, 2024

Just hit this using Apache Guacamole LDAP extension. It requests attributes using camelcase, and so they are filtered out. I think the problem is this test in search_response.js:

      } else if (self.attributes.length && self.attributes.indexOf(_a) === -1) {

That line is comparing the incoming (self.attributes) with the lowercased versions of those specified in the search response.

@x-way your workaround solved my issue, so thanks!

from node-ldapjs.

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.