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] Commented: (DIRSERVER-1285) Quotes in DN on simple binds causes referral error
Date Sun, 02 Nov 2008 01:11:44 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644547#action_12644547
] 

Emmanuel Lecharny commented on DIRSERVER-1285:
----------------------------------------------

I have double checked, and it's clearly a bug in the way we are normalizing the DN with "
around the RDN values.

It seems that the value is already normalized once, and that we are trying to normalizing
the upValue instead of the normValue.

I have a quick and dirty fix, but I would like to understand first why we are processing the
DN the way we do in the lookup method


Index: ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
===================================================================
--- ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java	(revision 704239)
+++ ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java	(working copy)
@@ -1365,12 +1365,19 @@
     private static void oidNormalize( Rdn rdn, OidNormalizer oidNormalizer ) throws NamingException
     {
         Object upValue = rdn.getUpValue();
+        Object normValue = rdn.getNormValue();
+        
+        if ( normValue != null && upValue != normValue)
+        {
+        	upValue = normValue;
+        }
+        
         String upType = rdn.getUpType();
         rdn.clear();
         Object normStringValue = DefaultStringNormalizer.normalizeString( ( String ) upValue
);
-        Object normValue = oidNormalizer.getNormalizer().normalize( normStringValue );
+        Object newNormValue = oidNormalizer.getNormalizer().normalize( normStringValue );
 
-        rdn.addAttributeTypeAndValue( upType, oidNormalizer.getAttributeTypeOid(), upValue,
normValue );
+        rdn.addAttributeTypeAndValue( upType, oidNormalizer.getAttributeTypeOid(), upValue,
newNormValue );
     }
 
     /**


> Quotes in DN on simple binds causes referral error
> --------------------------------------------------
>
>                 Key: DIRSERVER-1285
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1285
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>         Environment: Windows XP, embedded in another java app, jdk 1.6.0
>            Reporter: Daniel Henninger
>             Fix For: 1.5.5
>
>
> A user exists in my database:
> uid=openfire,ou=users,ou=system
> if I authenticate using that DN, everything is fine
> if I authenticate using:
> uid="openfire",ou="users",ou="system"
> (or any iteration of the quotes)
> I get an error:
> LDAP: error code 49 - Bind principalDN points to referral.

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