Uploaded image for project: 'LDAP'
  1. LDAP
  2. LDAP-168

Possible NPE on XWikiLDAPConnection#searchLDAP when referrals are disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 9.16.3
    • 9.16.1
    • API
    • None
    • Unknown
    • N/A
    • N/A

    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 log before the exception:

      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)
          ...
      

      Attachments

        Activity

          People

            josue Josué Tille
            josue Josué Tille
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: