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

LDAP eDirectory password expiration checks fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
      Linux
    • Database:
      MySQL
    • Affected Branches:
      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

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              imported Imported
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: