karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Anstey (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-2476) Special characters are dropped when generating the LDAP the user and role filters
Date Tue, 17 Sep 2013 17:30:53 GMT
Jonathan Anstey created KARAF-2476:
--------------------------------------

             Summary: Special characters are dropped when generating the LDAP the user and
role filters
                 Key: KARAF-2476
                 URL: https://issues.apache.org/jira/browse/KARAF-2476
             Project: Karaf
          Issue Type: Bug
            Reporter: Jonathan Anstey


The current code - org.apache.karaf.jaas.modules.ldap.LDAPLoginModule - forms the userFilter
and roleFilter:
logger.debug("Looking for the user in LDAP with ");
logger.debug(" base DN: " + userBaseDN);
userFilter = userFilter.replaceAll("%u", user);

logger.debug("Looking for the user roles in LDAP with ");
logger.debug(" base DN: " + roleBaseDN);
roleFilter = roleFilter.replaceAll("%u", user);
roleFilter = roleFilter.replaceAll("%dn", userDN);

the "replaceAll" method is a regular expression replacement that interprets special characters.
LDAP user names and DN can contain special characters and we do not want to process them.
The filters should be formed as "quotes" - uninterpreted strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message