Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3000

Password Expiration notification calculation has integer overflow problem.

    XMLWordPrintable

    Details

      Description

      org.opends.server.types.AccountStatusNotification.createProperties method has the following expiration Time calculation line of code:
      long expTime = System.currentTimeMillis() + (1000 * timeToExpiration);

      If timeToExpiration is > Integer.MAX_VALUE/1000, this performs integer math and you get an overflow.

      Simple change:
      long expTime = System.currentTimeMillis() + (1000L * timeToExpiration);

      will resolve this.

        Attachments

          Activity

            People

            Assignee:
            ludo Ludovic Poitou
            Reporter:
            andywang74 Andy Wang [X] (Inactive)
            Dev Assignee:
            Ludovic Poitou Ludovic Poitou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: