You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Giamma (JIRA)" <di...@incubator.apache.org> on 2005/07/06 00:47:12 UTC

[jira] Created: (DIREVE-179) NormalizationService is failing to parse escaped names

NormalizationService is failing to parse escaped names
------------------------------------------------------

         Key: DIREVE-179
         URL: http://issues.apache.org/jira/browse/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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DIRSERVER-297) NormalizationService is failing to parse escaped names

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

Emmanuel Lecharny closed DIRSERVER-297.
---------------------------------------


Closing all issues created in 2005 and before which are marked resolved

> NormalizationService is failing to parse escaped names
> ------------------------------------------------------
>
>                 Key: DIRSERVER-297
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-297
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIREVE-179) NormalizationService is failing to parse escaped names

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/DIREVE-179?page=comments#action_12319920 ] 

Alex Karasulu commented on DIREVE-179:
--------------------------------------

The test case commited above passes without a problem.  The space in the value is not lost after escaping the ',' before the space.  Are you sure this problem still exists?  If so please report.  I will perform an integration test to make sure normalized parsing does not cause this problem before I close this issue.  Let me know before then or let me know so I can reopen this issue.  Thanks.

> NormalizationService is failing to parse escaped names
> ------------------------------------------------------
>
>          Key: DIREVE-179
>          URL: http://issues.apache.org/jira/browse/DIREVE-179
>      Project: Directory Server
>         Type: Bug
>   Components: server main
>     Versions: 0.9
>     Reporter: Giamma
>     Assignee: 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIREVE-179) NormalizationService is failing to parse escaped names

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIREVE-179?page=all ]
     
Alex Karasulu resolved DIREVE-179:
----------------------------------

    Fix Version: 0.9.2
     Resolution: Fixed

Could not isolate the problem.  Somehow this issue was fixed with the changes made across releases.  Please confirm if the problem persists.

> NormalizationService is failing to parse escaped names
> ------------------------------------------------------
>
>          Key: DIREVE-179
>          URL: http://issues.apache.org/jira/browse/DIREVE-179
>      Project: Directory Server
>         Type: Bug
>   Components: server main
>     Versions: 0.9
>     Reporter: Giamma
>     Assignee: Alex Karasulu
>      Fix For: 0.9.2

>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIREVE-179) NormalizationService is failing to parse escaped names

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/DIREVE-179?page=comments#action_12319918 ] 

Alex Karasulu commented on DIREVE-179:
--------------------------------------

Tried to isolate this bug with the following test case committed on revision 239929 here:

http://svn.apache.org/viewcvs.cgi?rev=239929&view=rev

> NormalizationService is failing to parse escaped names
> ------------------------------------------------------
>
>          Key: DIREVE-179
>          URL: http://issues.apache.org/jira/browse/DIREVE-179
>      Project: Directory Server
>         Type: Bug
>   Components: server main
>     Versions: 0.9
>     Reporter: Giamma
>     Assignee: 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira