Giter Site home page Giter Site logo

LDAP-46: DirContextAdapter.getModificatioItems() doesnt ignore case when collecting values to be removed and added. about spring-ldap HOT 5 CLOSED

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024
LDAP-46: DirContextAdapter.getModificatioItems() doesnt ignore case when collecting values to be removed and added.

from spring-ldap.

Comments (5)

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024

Mattias Hellborg Arthursson said:

This issue should be addressed, but I wouldn’t want to do a hack just to make string comparisons be case-insensitive. First of all, while it is the most common case, not all Attributes are case-insensitive. Secondly, the same problem (or at least a similar one) applies to other Attributes as well. E.g. ‘uniqueMember’ represents a DN, but the same DN can be represented by different strings (i.e. with spaces etc.), so the same problem would apply there as well (if the Directory Server is grumpy).

We should address these types of problems in a generic and configurable way. Configuration won’t be too easy, the main problem being that DirContextAdapter instances are created all over the place (from DefaultDirObjectFactory as well as by users in their Dao methods). Bottom line, we’ll need to think more about this to get it done properly.

from spring-ldap.

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024

Mattias Hellborg Arthursson said:

Maybe we don’t need a complicated generic solution to this after all. An idea came up on the forum (http://forum.springframework.org/showthread.php?p=113359#post113359), which proposes to just make sure that the REMOVE_ATTRIBUTE items come first. While this will change Attribute value that really didn’t syntactically change, that’s actually not such a bad thing – after all what will be stored is the value in the case or format that the user actually specified.

from spring-ldap.

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024

Mattias Hellborg Arthursson said:

Did a fix for this – it is available in the nightly snapshots (as of tomorrow). Haven’t been able to verify it though, as the problem doesn’t present itself on ApacheDS (where we run our integration tests. I would appreciate it if you could verify it on your platform.

from spring-ldap.

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024

Mattias Hellborg Arthursson said:

Btw, the nightly snapshots are here:
http://static.springframework.org/downloads/nightly/spring-ldap.php

from spring-ldap.

spring-projects-issues avatar spring-projects-issues commented on July 26, 2024

Mattias Hellborg Arthursson said:

Reworked getModificationItems() to use Attribute.contains() to determine attribute value equality. Also, removed values are now always returned first in the ModificationItem array, avoiding the ATT_ALREAY_EXIST problems even if the Attribute implementation should be unable to determine syntactically correct Attribute equality.

In the future we might look further into this and use getAttrubuteSyntaxDefinition/getAttributeDefinition, but for the time being this will have to do.

from spring-ldap.

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.