Update LDAP library to fix auth filter bug
This commit is contained in:
@@ -227,8 +227,6 @@ key.path: '/path/to/sign.key'
|
||||
#
|
||||
# Example: (memberOf=CN=Matrix Users,CN=Users,DC=example,DC=org)
|
||||
#
|
||||
# /!\ Currently NOT supported due to a possible bug in LDAP library /!\
|
||||
#
|
||||
#ldap.auth.filter: ''
|
||||
|
||||
|
||||
|
@@ -83,7 +83,7 @@ dependencies {
|
||||
compile 'net.i2p.crypto:eddsa:0.1.0'
|
||||
|
||||
// LDAP connector
|
||||
compile 'org.apache.directory.api:api-all:1.0.0-RC2'
|
||||
compile 'org.apache.directory.api:api-all:1.0.0'
|
||||
|
||||
// DNS lookups
|
||||
compile 'dnsjava:dnsjava:2.1.8'
|
||||
|
@@ -64,6 +64,9 @@ public class LdapAuthProvider extends LdapGenericBackend implements Authenticato
|
||||
MatrixID mxIdExt = new MatrixID(id);
|
||||
String userFilterValue = StringUtils.equals(LdapThreePidProvider.UID, uidType) ? mxIdExt.getLocalPart() : mxIdExt.getId();
|
||||
String userFilter = "(" + getCfg().getAttribute().getUid().getValue() + "=" + userFilterValue + ")";
|
||||
if (!StringUtils.isBlank(getCfg().getAuth().getFilter())) {
|
||||
userFilter = "(&" + getCfg().getAuth().getFilter() + userFilter + ")";
|
||||
}
|
||||
EntryCursor cursor = conn.search(getCfg().getConn().getBaseDn(), userFilter, SearchScope.SUBTREE, getUidAttribute(), getCfg().getAttribute().getName());
|
||||
try {
|
||||
while (cursor.next()) {
|
||||
|
Reference in New Issue
Block a user