Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10921

LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.7.3, 1.8.3, 1.9
    • 1.8, 1.8.1, 1.8.2
    • Authentication
    • None
    • Moodle on LAMP with Active Directory as Authentication source
    • MOODLE_18_STABLE
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      inserting

      ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);

      around line 1315 like this:

      if (!empty($this->config->version))

      { ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->version); }

      ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);

      if (!empty($binddn)) {
      //bind with search-user

      Without this option being set the following errors will occur (you need to have debug messages turned on to see this)

      Warning: ldap_search(): Search: Operations error in /moodle/auth/ldap/auth.php on line 1380

      Warning: ldap_first_entry(): supplied argument is not a valid ldap result resource in /moodle/auth/ldap/auth.php on line 1388

      Not sure what impact this will have on other ldap authenication schemes. It should probably be wrapped with a test for selection of MS Active Directory as source.

            iarenaza Iñaki Arenaza
            thowden Tony Howden (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.