spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.67k stars 5.84k forks source link

SEC-608: Spaces after commas in distinguished names #869

Closed spring-projects-issues closed 16 years ago

spring-projects-issues commented 16 years ago

["Morten Olsen":https://jira.spring.io/secure/ViewProfile.jspa?name=morols](Migrated from ["SEC-608":https://jira.spring.io/browse/SEC-608?redirect=false]) said:

I'm looking up LDAP objects and using the mapper to extract their distinguished name (like in the below mapper). The DN returned seems to be with space after the delimiting commas. This behavior I have observed with DirContextAdapter.getNameInNamespace() and DirContextAdapter.getDn().

From reading the RFC 4514 it seems to me that these spaces should not be there.

protected static class TestContextMapper implements ContextMapper {
    public final Object mapFromContext(Object context) {
        DirContextAdapter ctx = (DirContextAdapter) context;
        System.out.println("\nDN: " + ctx.getDn());
    }
}
spring-projects-issues commented 16 years ago

["Luke Taylor":https://jira.spring.io/secure/ViewProfile.jspa?name=luke] said:

Although we now use it in Spring Security, DirContextAdapter is a Spring LDAP class so you should probably raise any RFC compatibility issues with them. This isn't a Spring Security issue.