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

LDAP eDirectory password expiration checks fail

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 1.6
    • None
    • Authentication
    • None
    • Linux
    • MySQL
    • MOODLE_16_STABLE

    Description

      Running RHEL4 using LDAP to authenticate against Novell Open Enterprise Server (Netware) the password expiration checks fail because of the case sensitive LDAP attribute names are lowercased. See diff below.

      — auth/ldap/lib.old.php 2006-05-08 10:58:22.000000000 -0500

      +++ auth/ldap/lib.php 2006-05-08 10:58:45.000000000 -0500

      @@ -347,13 +347,13 @@

      $sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);

      if ($sr) {

      $info=auth_ldap_get_entries($ldapconnection, $sr);

      • if ( empty($info[0][strtolower($CFG->ldap_expireattr)][0])) {

      + if ( empty($info[0][$CFG->ldap_expireattr][0]))

      { //error_log(ldap: no expiration value.$info[0][$CFG->ldap_expireattr]); // no expiration attribute, password does not expire $result = 0; }

      else {

      $now = time();

      • $expiretime = auth_ldap_expirationtime2unix($info[0][strtolower($CFG->ldap_expireattr)][0]);

      + $expiretime = auth_ldap_expirationtime2unix($info[0][$CFG->ldap_expireattr][0]);

      if ($expiretime > $now)

      { $result = ceil(($expiretime - $now) / DAYSECS); }

      else {

      Attachments

        Issue Links

          Activity

            People

              poltawski Dan Poltawski
              imported Imported
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: