Closed floatingatoll closed 11 years ago
Looks like the tests need to be updated as well. Will merge, fix and make sure bug is properly reproduced and fixed.
Resolved the domain search another way. Didn't merge due to ldapjs not supporting extensible matching and that would break all of our tests.
Fixes #101 by replacing o=com,dc=mozilla with dc=mozilla and extending the LDAP filter
Previously, this was searching o=com,dc=mozilla, which excludes some percentage of users who are under o=org,dc=mozilla.
This patch modifies the search in two ways, to search both o=com and o=org.
(1) o=com,dc=mozilla is replaced by dc=mozilla, widening the search scope to include both o=com, o=org, and many other o= results. (2) The search filter, which previously was (|(mail=?)(zimbraAlias=?)), is extended to also require either o=org or o=com using the approximate syntax (&(|(mail)(zimbraAlias))(|(org)(com)))
If in the future additional filters are required, they would be added as additional () groups inside the outermost (&...) filter, as follows:
(& (|(mail)(zimbraAlias)) (|(org)(com)) (...) )