directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giamma (JIRA)" <>
Subject [jira] Created: (DIREVE-179) NormalizationService is failing to parse escaped names
Date Tue, 05 Jul 2005 22:47:12 GMT
NormalizationService is failing to parse escaped names

         Key: DIREVE-179
     Project: Directory Server
        Type: Bug
  Components: server main  
    Versions: 0.9    
    Reporter: Giamma
 Assigned to: Alex Karasulu 

I wrote a custom partition to extract data from our oracle database.
Some of the names returned from out db needs to be escaped because they have special chars
like: "," "/" and "="
This is done using LdapName.escapeAttributeValue().

Unfortunately the DnParser (in NormalizationService) is not doing the right thing when processing
these escaped names.

I had to change the code in NormalizationService to still call the parser (to check invalid
DN syntax) but I skipped
using the text returned by the parser because it would remove spaces after an escaped ","

Let's say I have a RDN like this:
"ou=some test, something else"

After I escaped it it wil be like this:
"ou=some test\\, something else"

The parser will remove the space after the escaped ","
"ou=some test\\,something else"

And that breaks the code in my custom partition because it's not finding the right object.

Here is the fix I made.
But it's just an hack. I think the problem is in the DnParser. But I do not have the source
for that.

 protected void process( NextInterceptor nextInterceptor, Delete call ) throws NamingException
        synchronized( parser )
            // call.getName( parser.parse( call.getName().toString() ) );
            // call it anyway to catch invalid DN syntax
            parser.parse( call.getName().toString() );

        super.process( nextInterceptor, call );

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message