directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DIRSERVER-601) Incorrect results using Context lookup
Date Thu, 17 Aug 2006 21:05:17 GMT
     [ http://issues.apache.org/jira/browse/DIRSERVER-601?page=all ]

Alex Karasulu closed DIRSERVER-601.
-----------------------------------

    Fix Version/s: 1.0-RC4
       Resolution: Cannot Reproduce

We cannot reproduce this sorry.  With more feedback we can reopen this issue if the problem
can be found.


> Incorrect results using Context lookup
> --------------------------------------
>
>                 Key: DIRSERVER-601
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-601
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.0-RC1
>         Environment: Windows - JDK 1.4.2_07
>            Reporter: Simon Temple
>         Assigned To: Stefan Zoerner
>             Fix For: 1.0-RC4
>
>
> The attached code demonstrates how a lookup using an invalid name (The VERY-BROKEN segment
should be obvious) returns a result
> instead of throwing an exception:
> import java.util.Hashtable;
> import javax.naming.Context;
> import javax.naming.NameClassPair;
> import javax.naming.NamingEnumeration;
> import javax.naming.NamingException;
> import javax.naming.directory.DirContext;
> import javax.naming.directory.InitialDirContext;
> class LDAPTest
> {
>     public static void main(String[] args)
>     {
>         // Identify service provider to use
>         Hashtable env = new Hashtable(11);
>         env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>         env.put(Context.PROVIDER_URL, "ldap://localhost:10389/");
>         env.put(Context.SECURITY_AUTHENTICATION, "simple");
>         env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
>         env.put(Context.SECURITY_CREDENTIALS, "secret");
>         try
>         {
>             // Create the initial directory context
>             DirContext ctx = new InitialDirContext(env);
>             DirContext ctx2 = (DirContext)ctx.lookup("ou=loadedLdifFiles,VERY-BROKEN=configuration,ou=system");
>             NamingEnumeration ne = ctx2.list("");
>             while (ne.hasMoreElements())
>             {
>                 NameClassPair pair = (NameClassPair)ne.nextElement();
>                 System.out.println("pair: "+pair.getName()+" == "+pair.getClassName());
>             }
>             
>             ctx2.close();
>             ctx.close();
>         }
>         catch (NamingException e)
>         {
>             System.err.println("Exception: " + e);
>             e.printStackTrace();
>         }
>     }
> }

-- 
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

        

Mime
View raw message