From be8e79f1d8da7f47014288f6866f2f2b5def715e Mon Sep 17 00:00:00 2001 From: Maxime Dor Date: Mon, 17 Apr 2017 11:39:47 +0200 Subject: [PATCH] Temporary fix for LDAP Referrals --- .../groovy/io/kamax/mxisd/lookup/provider/LdapProvider.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/groovy/io/kamax/mxisd/lookup/provider/LdapProvider.groovy b/src/main/groovy/io/kamax/mxisd/lookup/provider/LdapProvider.groovy index 0cd4867..53e3348 100644 --- a/src/main/groovy/io/kamax/mxisd/lookup/provider/LdapProvider.groovy +++ b/src/main/groovy/io/kamax/mxisd/lookup/provider/LdapProvider.groovy @@ -26,6 +26,7 @@ import io.kamax.mxisd.config.ServerConfig import io.kamax.mxisd.lookup.SingleLookupRequest import io.kamax.mxisd.lookup.ThreePidMapping import org.apache.commons.lang.StringUtils +import org.apache.directory.api.ldap.model.cursor.CursorLdapReferralException import org.apache.directory.api.ldap.model.cursor.EntryCursor import org.apache.directory.api.ldap.model.entry.Attribute import org.apache.directory.api.ldap.model.message.SearchScope @@ -94,6 +95,8 @@ class LdapProvider implements ThreePidProvider { return Optional.of(matrixId.toString()) } } + } catch (CursorLdapReferralException e) { + log.warn("3PID {} is only available via referral, skipping", value) } finally { cursor.close() }