directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DIRSERVER-578) LDAP Name Parser Trapped in Infinite Loop
Date Wed, 09 Jul 2008 13:39:32 GMT

     [ https://issues.apache.org/jira/browse/DIRSERVER-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny closed DIRSERVER-578.
---------------------------------------


> LDAP Name Parser Trapped in Infinite Loop
> -----------------------------------------
>
>                 Key: DIRSERVER-578
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-578
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: pre-1.0
>         Environment: Fedora Core 4
>            Reporter: Ole Ersoy
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.0-RC1
>
>
> Hi Stefan,
> Here's some JNDI JUnit Testing code that runs fine on
> 0.9:
> package com.pyramidetechnologies.webapp.mdc;
> import java.util.Hashtable;
> import javax.naming.Context;
> import javax.naming.NamingException;
> import javax.naming.directory.DirContext;
> import javax.naming.directory.InitialDirContext;
> import junit.framework.TestCase;
> public class LDAPTesting extends TestCase {
> 	public DirContext authenticate() {
> 		try {
> 			Hashtable<String, String> env = new
> Hashtable<String, String>();
> //			 Set up the environment for creating the initial
> context
> 			env.put(Context.INITIAL_CONTEXT_FACTORY, 
> 					"com.sun.jndi.ldap.LdapCtxFactory");
> 			env.put(Context.PROVIDER_URL,
> "ldap://localhost:389/ou=users,ou=system");
> //			 Authenticate as S. User and password "mysecret"
> 			env.put(Context.SECURITY_AUTHENTICATION, "simple");
> 			env.put(Context.SECURITY_PRINCIPAL, 
> "uid=admin,ou=system");
> 			env.put(Context.SECURITY_CREDENTIALS, "secret");
> 			DirContext ctx = new InitialDirContext(env);
> 		
> ctx.createSubcontext("mail=ole@pyramidetechnologies");
> 		
> ctx.destroySubcontext("mail=ole@pyramidetechnologies");
> 			return ctx;
> 		} catch (NamingException e) {
> 			e.printStackTrace();
> 			return null;
> 		}
> 	}
> 	
> 	public void testAddContext() {
> 		DirContext ctx=authenticate();
> 		try {
> 		
> ctx.createSubcontext("mail=ole@pyramidetechnologies");
> 		
> ctx.destroySubcontext("mail=ole@pyramidetechnologies");
> 		} catch (NamingException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		}
> 		
> 	}
> }
> This code crashes the server (The only thing changed
> is this:
> ctx.createSubcontext("mail=mail=ole@pyramidetechnologies");
> Hope that helps.
> Cheers,
> - Ole

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


Mime
View raw message