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

LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1, 1.8.2
    • Fix Version/s: 1.7.3, 1.8.3, 1.9
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
      Moodle on LAMP with Active Directory as Authentication source
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Oct/07