Claus Ibsen created CAMEL-27821:
-----------------------------------

             Summary: camel-ldap: pageSize always fails with a Hashtable or Map 
bean, returnedAttributes are not trimmed
                 Key: CAMEL-27821
                 URL: https://issues.apache.org/jira/browse/CAMEL-27821
             Project: Camel
          Issue Type: Bug
          Components: camel-ldap
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-ldap for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31140).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. pageSize fails with a Hashtable or Map bean
For a Hashtable or Map bean, {{LdapProducer}} creates an InitialDirContext, 
which is not an LdapContext, so pageSize always fails with 
IllegalArgumentException("...you must provide a LdapContext"), for the bean 
kind the docs use.
Proposed change: create new InitialLdapContext(env, null) instead.

h4. 2. returnedAttributes are not trimmed
The constructor splits returnedAttributes on "," without trimming; with "uid, 
cn" the name " cn" is sent and the server silently leaves cn out (RFC 4511 
4.5.1.8).
Proposed change: trim each name and drop empty ones.


_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to