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] [Updated] (KARAF-2476) Special characters are dropped when generating the LDAP the user and role filters
Date Tue, 17 Sep 2013 17:34:53 GMT

     [ https://issues.apache.org/jira/browse/KARAF-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Anstey updated KARAF-2476:
-----------------------------------

    Attachment: KARAF-2476-karaf-2.x.patch

Patch to fix issue on karaf-2.x branch.
                
> 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
>         Attachments: KARAF-2476-karaf-2.x.patch
>
>
> 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