There are 7 updates.
 
 
LDAP / cid:jira-generated-image-avatar-22e39f38-8e73-4deb-81d4-7357ef567af6 LDAP-168 Closed

Possible NPE on XWikiLDAPConnection#searchLDAP when referrals are disabled

 
View issue   ·   Add comment
 

7 updates

 
cid:jira-generated-image-avatar-4bec6798-b61b-443a-89e4-d1bee8d2c158 Changes by Josué Tille on 29/Jul/26 16:46
 
Fix Version: 9.16.3
Documentation in Release Notes: N/A
Documentation: N/A
Resolution: Fixed
Status: Open Closed
 
cid:jira-generated-image-avatar-60a2810f-e7a2-4e6f-ba23-9fd049a7f095 Changes by Thomas Mortagne on 29/Jul/26 16:46
 
Summary: Possible NPE on XWikiLDAPConnection#searchLDAP when referrals are disabled
Description: Issue probably difficult to reproduce without a specific setup but it seem that when we have in the LDAP settings {{xwiki.authentication.ldap.follow_referrals=0}} and we call {{XWikiLDAPConnection#searchLDAP}} we can end on a NPE with this following stacktrace log before the exception :

{code}
2026-07-29 15:21:15,210 [http-nio-8080-exec-340 - https://domain.tld/xwiki/bin/view/XXX/LiveTableResults] DEBUG o.x.c.l.PagedLDAPSearchResults - Failed to call next value because it require a referral but referral following is disabled
com.novell.ldap.LDAPReferralException: Referral
at com.novell.ldap.LDAPSearchResults.next(LDAPSearchResults.java:253)
at org.xwiki.contrib.ldap.PagedLDAPSearchResults.next(PagedLDAPSearchResults.java:185)
at org.xwiki.contrib.ldap.XWikiLDAPConnection.searchLDAP(XWikiLDAPConnection.java:531)
at org.xwiki.contrib.ldap.XWikiLDAPUtils.searchUserAttributesByUid(XWikiLDAPUtils.java:1222)
    ...
{code}