From d0bc52fff1d8901decff5b16dd2e6ed07bb67354 Mon Sep 17 00:00:00 2001 From: Sascha Vogt Date: Thu, 28 May 2015 12:00:34 +0200 Subject: [PATCH] Fix for MRM-1873 which broke AD group assignments Escaping only needed in the LDAP filter string --- .../redback/common/ldap/role/DefaultLdapRoleMapper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java index 101d156f..369ff17a 100644 --- a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java +++ b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapper.java @@ -392,11 +392,9 @@ public class DefaultLdapRoleMapper groupEntry = builder.toString(); } - groupEntry = Rdn.escapeValue(groupEntry); - String filter = new StringBuilder().append( "(&" ).append( "(objectClass=" + getLdapGroupClass() + ")" ).append( - "(" ).append( getLdapGroupMember() ).append( "=" ).append( groupEntry ).append( ")" ).append( + "(" ).append( getLdapGroupMember() ).append( "=" ).append( Rdn.escapeValue(groupEntry) ).append( ")" ).append( ")" ).toString(); log.debug( "filter: {}", filter );