Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-217

SyncopeUser.hasTokenExpired() can easily cause nullpointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.2-incubating
    • 1.0.3-incubating, 1.1.0
    • core
    • None

    Description

      public boolean hasTokenExpired() {
      return tokenExpireTime.before(new Date());
      }

      should be changed to:

      public boolean hasTokenExpired() {
      return tokenExpireTime == null
      ? false
      : tokenExpireTime.before(new Date());
      }

      A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.

      Attachments

        1. SyncopeUser.java.patch
          0.6 kB
          Jan Bernhardt
        2. SyncopeUser.java.patch
          0.7 kB
          Jan Bernhardt

        Activity

          People

            ilgrosso Francesco Chicchiriccò
            jan4talend Jan Bernhardt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: