[jboss-jira] [JBoss JIRA] Reopened: (JBPORTAL-1592) Backslashes not escaped correctly with ldap modules
Tobias Roth (JIRA)
jira-events at lists.jboss.org
Fri Aug 3 08:19:50 EDT 2007
[ http://jira.jboss.com/jira/browse/JBPORTAL-1592?page=all ]
Tobias Roth reopened JBPORTAL-1592:
-----------------------------------
Maybe I am misunderstanding something, but I still think there is a bug around. The filter you posted works and all, but in a real-world scenario, that's not what one would use for a filter. The filter is constructed by the code, one would not directly add LastName, FirstName for a filter, or only that specific user would be found.
If you look at the log snippets I pasted in a previous post, here is what happens: The user enters his credentials in the login box. The code finds the record for that user, and from that record, it takes the DN. From that DN (which may contain a comma), it constructs the search filter to search for roles. Now, if the DN does contain a comma, no roles are found, because the code does not escape the comma correctly. There is no way I can fix this by adapting the filters in my config, or am I missing something?
> Backslashes not escaped correctly with ldap modules
> ---------------------------------------------------
>
> Key: JBPORTAL-1592
> URL: http://jira.jboss.com/jira/browse/JBPORTAL-1592
> Project: JBoss Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Portal Identity
> Affects Versions: 2.6 Final
> Environment: Windows XP Professional, Jboss 4.3.0, JBoss_Portal_2_6_0 from svn
> Reporter: Tobias Roth
> Assigned To: Boleslaw Dawidowicz
> Fix For: 2.8 Final, 2.6.2 Final
>
>
> LDAPRoleModule and LDAPExtRoleModule don't find roles associated with users, if the users DN contains a backslash, as it is frequent with Microsoft Active Directory.
> Example logfile excerpts and are given in the forum.
> I added a simple filter = filter.replaceAll("\\\\", "\\\\\\\\"); in one place in LDAPExtRoleModuleImpl.java which fixed the thing for me. However, not knowing much of java, I don't know the correct place to add this, so that all cases are fixed.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list