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

LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

            iarenaza Iñaki Arenaza
            thowden Tony Howden
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07