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

LDAP eDirectory password expiration checks fail

XMLWordPrintable

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

      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 {

            poltawski Dan Poltawski
            imported Imported
            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.