Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8167647

Copy-and-paste bug in javax.security.auth.kerberos.KerberosTicket.toString()

XMLWordPrintable

    • b142
    • generic
    • generic
    • Not verified

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Cross=platform (and cross-JRE-version). Initially observed on Windows 7 with JRE versions all the way back to 1.6.0_45, but also reproduces just fine with 1.8.0_92 on x64 Ubuntu. The bug is still present in the current OpenJDK 9 source code.

      A DESCRIPTION OF THE PROBLEM :
      In the two lines that start here:

          http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/2bf254421854/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosTicket.java#l696

      The first line is correct; the second line has a cut-and-paste error and hence displays an incorrect value for the "Initial Ticket" flag.

      It looks to me as though this bug has been present since this code was first released in JDK 1.4.

      Happily, the KerberosTicket.isInitialTicket() method doesn't have this bug and does actually return the correct value.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't be too trusting of KerberosTicket.toString() output.

            weijun Weijun Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: