You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into the same problem. The comparison in isChildOf is case sensitive in regard to the attribute values (not the attribute names which have been changed to lower case before). This is incorrect if the attribute is, for instance, of type DirectoryString using matching rule caseIgnoreMatch for equality match.
For example, we use base DN "ou=people,o=ldap". A user DN might be "uid=test,ou=People,o=ldap" (note the capital "P").
isChildOf won't match in this case, even though the user DN is of a child of the base DN. This is incorrect as the ou attribute must be checked case insensitive.
This compares attribute names and values case insensitive. Of course, this is not complete as whitespace should be removed as well and some attributes in the DN might actually be case sensitive. Thus I guess ideally, the test should be done by an ldap query instead...
The comparison should use the schema-information for the attribute to decide whether to check case sensitive or insensitive. As that might include a severe performance-issue I'll need to check how to implement that in a way that satisfies all needs…
This is a "reopen" of zendframework/zendframework#6299
I just ran into the same problem. The comparison in isChildOf is case sensitive in regard to the attribute values (not the attribute names which have been changed to lower case before). This is incorrect if the attribute is, for instance, of type DirectoryString using matching rule caseIgnoreMatch for equality match.
For example, we use base DN "ou=people,o=ldap". A user DN might be "uid=test,ou=People,o=ldap" (note the capital "P").
isChildOf won't match in this case, even though the user DN is of a child of the base DN. This is incorrect as the ou attribute must be checked case insensitive.
As a quick workaround I modified the line
in Dn.php to this test:
This compares attribute names and values case insensitive. Of course, this is not complete as whitespace should be removed as well and some attributes in the DN might actually be case sensitive. Thus I guess ideally, the test should be done by an ldap query instead...
Originally posted by @gvde at zendframework/zend-ldap#54
The text was updated successfully, but these errors were encountered: