Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Sync fails with 389-ds LDAP server #14

Open
tjmcomp opened this issue Feb 17, 2021 · 1 comment · May be fixed by #15
Open

Sync fails with 389-ds LDAP server #14

tjmcomp opened this issue Feb 17, 2021 · 1 comment · May be fixed by #15

Comments

@tjmcomp
Copy link

tjmcomp commented Feb 17, 2021

When trying to sync contacts i get the following error on the LDAP server
SRCH base="ou=contacts,dc=example,dc=com" scope=2 filter="(objectClass=*)", invalid attribute request

The app reports Protocol error as the reason for the sync failure

The same result is experienced on various devices.

@tjmcomp
Copy link
Author

tjmcomp commented Feb 25, 2021

I have traced the error to L162 in LDAPUtilities.java
String[] ldapArray = new String[preferences.getAll().size()];

The size produces to null value elements in the array which are the baseDn and filterString keys which are excluded. This produces an attribute string for the request which has 2 invalid attributeNames as null.

This can be fixed with String[] ldapArray = new String[preferences.getAll().size() - 2];

@tjmcomp tjmcomp linked a pull request Feb 25, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant