You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Tony Blanchard (JIRA)" <ji...@apache.org> on 2006/03/21 17:22:03 UTC

[jira] Created: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Spaces in PROVIDER_URL environment value seems to lead to problems
------------------------------------------------------------------

         Key: DIRSERVER-602
         URL: http://issues.apache.org/jira/browse/DIRSERVER-602
     Project: Directory ApacheDS
        Type: Bug
    Versions: 1.0-RC2    
 Environment: WIN XP
ACI Enabled
sun LdapCtxFactory
    Reporter: Tony Blanchard


I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".

Ex :
lEnv.put(...);
lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");

try
{
      lContext = new InitialDirontext(lEnv);
}
  [ .... ]

As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-602.
---------------------------------------


closed

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>                 Key: DIRSERVER-602
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-602
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC2
>         Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>            Reporter: Tony Blanchard
>            Assignee: Stefan Zoerner
>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=all ]

Stefan Zoerner reassigned DIRSERVER-602:
----------------------------------------

    Assign To: Stefan Zoerner

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard
>     Assignee: Stefan Zoerner

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=comments#action_12371336 ] 

Emmanuel Lecharny commented on DIRSERVER-602:
---------------------------------------------

As stated by RFC 2255 :

"Note that any URL-illegal characters (e.g., spaces), URL special
   characters (as defined in section 2.2 of RFC 1738) and the reserved
   character '?' (ASCII 63) occurring inside a dn, filter, or other
   element of an LDAP URL MUST be escaped using the % method described
   in RFC 1738 [5]"

So lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");  is not valid.

However, the problem remains if it does not work with lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon%20entreprise,dc=fr"); , as Stefan said.

This has to be evaluated and fixed.

Do you have a full testcase, Tony? It can help a lot :)

Thanks for the report !

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Tony Blanchard (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=comments#action_12371261 ] 

Tony Blanchard commented on DIRSERVER-602:
------------------------------------------

Hi Stefan

the "CurrentDN" is shown in my netbeans 4.1 debugger.
My JDK version is 1.5.0_04
I have already tried to replace the blank char with "%20" but it made no difference.

If I search under the context I created with this problem, the exception returned by ApacheDs gives also an incomplete name as baseDN for the search operation.

Hope this help.
If you need another information, I will be there

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=comments#action_12371259 ] 

Stefan Zoerner commented on DIRSERVER-602:
------------------------------------------

I have some questions.

How do you determine the "currentDN" from the DirContext? 
Which JDK-Version do you use?
What happens, if you try this LDAP URL? (blank is encoded)
lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon%20entreprise,dc=fr"); 

Thanks in advance, Stefan

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=all ]
     
Stefan Zoerner resolved DIRSERVER-602:
--------------------------------------

    Resolution: Won't Fix

In order to reflect the comment from Tony, that encoding of the blank in the URL makes his situation work, I resolve this issue ("Won't fix").

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard
>     Assignee: Stefan Zoerner

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRSERVER-602) Spaces in PROVIDER_URL environment value seems to lead to problems

Posted by "Tony Blanchard (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-602?page=comments#action_12371409 ] 

Tony Blanchard commented on DIRSERVER-602:
------------------------------------------

While trying to make a test case as asked by Emmanuel, I noticed my " " replacement was not compiled with my other dependencies.

I am really sorry for time loss.
In fact, replacing " " by "%20", as I made in code but as I did not compile correctly, works just fine.

Sorry again for the mistake...
This JIRA entry should be closed.

> Spaces in PROVIDER_URL environment value seems to lead to problems
> ------------------------------------------------------------------
>
>          Key: DIRSERVER-602
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-602
>      Project: Directory ApacheDS
>         Type: Bug
>     Versions: 1.0-RC2
>  Environment: WIN XP
> ACI Enabled
> sun LdapCtxFactory
>     Reporter: Tony Blanchard

>
> I found that giving a PROVIDER_URL value like this : "ldap://localhost:389/ou=Mon entreprise,dc=fr" to the InitialDirContext constructor returned a DirContext with a currentDN attribute to :"ou=Mon".
> Ex :
> lEnv.put(...);
> lEnv.put(Context.PROVIDER_URL, "ldap://localhost:389/ou=Mon entreprise,dc=fr");
> lEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
> try
> {
>       lContext = new InitialDirontext(lEnv);
> }
>   [ .... ]
> As a result, I can not use correctly this context. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira