You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Zoerner (JIRA)" <ji...@apache.org> on 2007/01/07 18:04:27 UTC

[jira] Created: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add opeartion fails due to missing parent

Value of matchedDN keeps leading spaces, if add opeartion fails due to missing parent
-------------------------------------------------------------------------------------

                 Key: DIRSERVER-815
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
             Project: Directory ApacheDS
          Issue Type: Bug
    Affects Versions: 1.5.0
         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
* Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
* Windows XP Professional SP2
            Reporter: Stefan Zoerner
            Priority: Minor


If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  

LDIF-File Fiona.ldif:
---8<---
dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
objectclass: person
objectclass: top
sn: Apple
cn: Fiona Apple
--->8---

$ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
ldap_add: No such object
ldap_add: matched:  dc=example, dc=com
ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found

But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.

Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Commented: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462854 ] 

Stefan Zoerner commented on DIRSERVER-815:
------------------------------------------

I have added a test case OpsWithMissingParentNetscapeSDK.java to this issue. As already described, I was not able to reproduce the problem with JNDI. The JUnit test case uses Netscape SDK instead. The behavior is also present for delete and modify operations, not only the add operation. The test therefore contains three tests, all of them fail with the current ApacheDS 1.5.0 SNAPSHOT.

The test passes with the following servers:
    * Sun Java System Directory Server 5.2
    * IBM Tivoli Directory Server 6.0
    * OpenLDAP 2.3

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Closed: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

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

Stefan Zoerner closed DIRSERVER-815.
------------------------------------


Thanks Emmanuel for the quick fix! It works perfect. Note that the problem does not exist in the current 1.0.1 SNAPSHOT. Therefore solving it in 1.5 only is appropriate.

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Commented: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

Posted by "Stefan Zoerner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462871 ] 

Stefan Zoerner commented on DIRSERVER-815:
------------------------------------------

Thanks for the immediate response. The problem is a legacy client I have, which assumes that leading spaces are trimmed in the matchedDN value, and I am probably not able to change this. It will at least not be that simple to convince my customer.

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Commented: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

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

Emmanuel Lecharny commented on DIRSERVER-815:
---------------------------------------------

So far, I think this is because we get the user provided DN to construct the matchedDN. In your case, we cut it to just get the wrong part.

As the initial DN contains some spaces, we keep them :
initial DN : cn=Fiona_Apple,_ou=missing,_dc=example,_dc=com
(spaces have been replaced by _ )
now, the cut part is : _ou=missing,_dc=example,_dc=com

and we return it as is. Would you have had 10 spaces before ou, you will have seen them too.

Ok, then, is this a problem? Spaces are not significant anyway, and I guess a client will use an API to deal with DN (because it's damn complicated to parse !!!), so do we have to modify the server to suppress those leading spaces ?

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Updated: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

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

Stefan Zoerner updated DIRSERVER-815:
-------------------------------------

    Summary: Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry  (was: Value of matchedDN keeps leading spaces, if add opeartion fails due to missing parent)

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Updated: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

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

Stefan Zoerner updated DIRSERVER-815:
-------------------------------------

    Attachment: OpsWithMissingParentNetscapeSDK.java

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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

        

[jira] Resolved: (DIRSERVER-815) Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry

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

Emmanuel Lecharny resolved DIRSERVER-815.
-----------------------------------------

    Resolution: Fixed

The matchedDN is now trimmed before being sent to the client.

Fixed in 1.5 : http://svn.apache.org/viewvc?view=rev&rev=493854

> Value of matchedDN keeps leading spaces, if add operation fails due to missing parent entry
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-815
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-815
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0 (SNAPSHOT)
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>            Priority: Minor
>         Attachments: OpsWithMissingParentNetscapeSDK.java
>
>
> If I try to add an entry with DN "cn=Fiona Apple, ou=missing, dc=example, dc=com" (spaces are important), and the parent entry "ou=missing, dc=example, dc=com" does not exist, the operation fails with the correct result code (32: no such object).  
> LDIF-File Fiona.ldif:
> ---8<---
> dn: cn=Fiona Apple, ou=missing, dc=example, dc=com
> objectclass: person
> objectclass: top
> sn: Apple
> cn: Fiona Apple
> --->8---
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ******-q -c -a -f Fiona.ldif
> ldap_add: No such object
> ldap_add: matched:  dc=example, dc=com
> ldap_add: additional info: failed to add entry cn=Fiona Apple,ou=missing,dc=example,dc=com: Parent  ou=missing, dc=example, dc=com not found
> But the value of the matchedDN field starts with a blank (it is "_dc=example,_dc=com", '_' denotes a blank). This behavior is present in the current 1.5 SNAPSHOT only. In the 1.0 release, the matchedDN value is "dc=example,_dc=com", which is the expected result.
> Unfortunately I was not able to reproduce this problem with JNDI yet. JNDI seems to modify the matchedDN result in the NameNotFoundException. But with Netscape SDK the problem is reproducible.

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