Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1735

When ads-pwdmaxage attribute is set to more then 2147483, then all user passwords are expirer forever.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M7
    • Fix Version/s: 2.0.0-M8
    • Component/s: core
    • Labels:
      None

      Description

      We want to configure password max age for 90 days. We set ads-pwdmaxage to value 7776000. From this moment all user passwords are always expired. We found the root cause:
      There is a bug in source code. package org.apache.directory.server.core.authn.PasswordUtil class. Method
      public static boolean isPwdExpired( String pwdChangedZtime, int pwdMaxAgeSec ).
      You multiply -> long time = pwdMaxAgeSec * 1000;
      pwdMaxAgeSec is int and when it is 7776000 multiplied by 1000 will get out of int range.
      Please convert pwdMaxAgeSec to long before multiplying it by 1000 and assigning the result into long time.

        Activity

        Hide
        Pierre-Arnaud Marcelot added a comment -

        Fixed at commit 1362460.

        http://svn.apache.org/viewvc?rev=1362460&view=rev

        Thanks for the report and the fix.

        Show
        Pierre-Arnaud Marcelot added a comment - Fixed at commit 1362460. http://svn.apache.org/viewvc?rev=1362460&view=rev Thanks for the report and the fix.

          People

          • Assignee:
            Pierre-Arnaud Marcelot
            Reporter:
            Oldrich Novak
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development